Skip to main content

Linux command: runlevel

CentOS 4.8: /etc/inittab file

List of 7 runlevels on Linux:

  • 0 - halt
  • 1 - Single user mode
  • 2 - Multiuser, without NFS (same as 3, if NOT have networking
  • 3 - Full multiuser mode
  • 4 - unused
  • 5 - X10
  • 6 - reboot

Check current runlevel

runlevel
who -r

For systemd

systemctl get-default

Change default runlevel to 3

Edit /etc/inittab file

id:3:initdefault:

Just for fun, what if we set initdefault run level to 6.

Try settings initdefault run level to 6

The system keeps rebooting if we try setting initdefault run level to 6.

The system keep rebooting if initdefault run level is set to 6