Linux Reboot and Shutdown
Simple system reboot and shutdown commands in linux.
Reboot the system
reboot
systemctl reboot
shutdown -r now
init 6
telinit 6
Shutdown
halt
sytemctl halt
shudown -h now
init 0
telinit 0
Poweroff
poweroff
systemctl poweroff
Suspend
systemctl suspend
Hibernation and suspend
systemctl supend
Boot system manually
The default run level was set in the /etc/inittab file.
- single: maintenance level,
- level without network resources (NFS, etc),
- multi-user level without graphical interface,
- multi-user level with graphical interface.
To get the current run level with the old way, type:
runlevel
Other
- systemctl rescue: to move to single user mode/maintenance level with mounted local file systems,
- systemctl emergency: to move to single user mode/maintenance with only /root mounted file system,
- systemctl isolate multi-user.target: to move to multi-user level without graphical interface (equivalent to previous run level 3),
- systemctl isolate graphical.target: to move to multi-user level with graphical interface (equivalent to previous run level 5),
- systemctl set-default graphical.target: to set the default run level to multi-user graphical mode,
- systemctl get-default: to get the default run level.