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

Popular posts from this blog

Docker: Commonly Used Commands

Repeat to remember Remember to repeat

Windows 10: Install SuSE Linux Enterprise - SLES

With Microsoft-Windows-Subsystem-Linux feature enabled, we can install Linux distributions on Windows 10.

Linux command: Ways to Find Hostname

hostname uname -n n stands for nodename hostname -f f stands for FQDN