Overview
The purpose of this document give insight into Linux Run
levels configurations in RHEL 7 / CentOS 7 version.
Applies To
RHEL 7, CentOS 7
Run Levels
Systemd deals
with run levels. As everything is represented by files in systemd, target files replace run
levels.
System Commands Table
Options
|
Purpose
|
default
|
Enter system default mode
|
rescue
|
Enter system rescue mode
|
emergency
|
Enter system emergency mode
|
halt
|
Shut down and halt the system
|
poweroff
|
Shut down and power-off the system
|
reboot
|
Shut down and reboot the system
|
kexec
|
Shut down and reboot the system with kexec
|
exit
|
Request user instance exit
|
switch-root
[ROOT] [INIT]
|
Change to a different root file system
|
suspend
|
Suspend the system
|
hibernate
|
Hibernate the system
|
hybrid-sleep
|
Hibernate and suspend the system
|
Switch
to Maintenance Mode
To switch into maintenance mode, run the command;
systemctl rescue
Note: Other
option is also available emergency target only available when set up in the kernel boot
line (systemd.unit=emergency.target)
and for critical situations.
Isolate
The purpose of “Isolate”
attribute is to start one unit and stop all others.
Switch
to multi-user (level 3) mode
To Switch into multi-user level, which is equivalent to
pervious level 3
systemctl isolate multi-user.target
or:
systemctl isolate runlevel3.target
Switch
to graphical (level 5) mode
To Switch into GUI mode, which is equivalent to the previous
level 5
systemctl isolate graphical.target
or:
systemctl isolate runlevel5.target
Set
default RunLevel to multi-user mode
systemctl set-default multi-user.target
Set
default RunLevel to graphical mode
systemctl set-default graphical.target
Get
current default RunLevel
To get / display the currently set default RunLevel.
systemctl get-default
Poweroff
– Server
To poweroff the server run the command;
systemctl poweroff
Reboot
– Server
To reboot the server with default runlevel, run
the command;
systemctl reboot
Halt
– Server
To halt the server, run the command;
systemctl halt
SlideShare Information
Guide to configure different Runlevels with screenshots is uploaded.
No comments:
Post a Comment