Table of Contents
101.3 Change runlevels and shutdown or reboot system
Key Knowledge Areas
- Set the default runlevel.
- Change between run levels including single user mode.
- Shutdown and reboot from the command line.
- Alert users before switching runlevels or other major system event.
- Properly terminate processes.
- Knowledge of basic features of systemd and Upstart
Terms and Utilities
|0||Halt the system|
|2||Multi-User - default at Debian systems, on Red Hat this is multi-user without NFS and X|
|3||Multi-User - default at Red Hat systems (everything except X), not used at Debian|
|5||Multi-User - on Red Hat that's like runlevel 3, but with X|
|6||Reboot the system|
Switch to Single-User mode (1)
To boot directly into runlevel 1 either append
single as the last parameter to your GRUB bootloader. These parameters will be passed to the init subsystem.
Alternatively, runlevel can be changed with the
init 1 will change to runlevel 1.
The default runlevel at boot time is looked up in
# The default runlevel. id:2:initdefault:
To determine the runlevel you're currently using run the
To bring down your system in a controled way, use the
# reboot now shutdown -r now # fast reboot without filesystem checks on next boot shutdown -rf now # halt the system within 10 minutes with a warning message shutdown -h +10 Going down in 10 minutes! # reboot at midnight shutdown -r 23:59