LPI-1 Linux Certification – Runlevels

Runlevel Debian Red Hat
0 Shutdown
1 Single user / maintenance mode
2 Multi-user mode (default) Multi-user mode without network
3 Multi-user mode Multi-user mode with network
4 Multi-user mode Unused, for custom use
5 Multi-user mode Multi-user mode with network and X(default)
6 Reboot
S Single user / maintenance mode (usually accessed through runlevel 1)

The default runlevels are 2 3 4 5

 

who -r

runlevel

Display the previous and the current runlevel
telinit runlevel

init runlevel

init 0

telinit 0

Change runlevel
shutdown -h now

halt

poweroff

init 6

telinit 6

Halt the system
shutdown -r now

reboot

Reboot the system
shutdown Shut down the system in a secure way: all logged in users are notified via a message to their terminal, and login is disabled.

This command can be run only by the root user and by those users (if any) listed in

/etc/shutdown.allow

shutdown -h 16:00 message Schedule a shutdown for 4 PM and send a warning message to all logged in users
shutdown -a Non-root users that are listed in /etc/shutdown.allow can use this command to shut down the system
shutdown -f Skip fsck on reboot
shutdown -F Force fsck on reboot
shutdown -c Cancel an already running shutdown