runlevel: Check your current runlevel. Then change it

Written by Benjamin Cane on 2011-08-10 20:30:06

Today's commands are how you can check what runlevel your system is in and then change it.

Check the current runlevel:

[[email protected] tmp]# runlevel   
N 5

Change the current runlevel:

[[email protected] tmp]# init <new_level>

The run levels in Unix/Linux are used to define what state init (the parent of all processes) is in. Each distribution of Unix/Linux has different definitions of what run levels starts what processes.

Usually you can find the different definitions in /etc/inittab below is the one from a fedora box.

# Default runlevel. The runlevels used are:  
# 0 - halt (Do NOT set initdefault to this)  
# 1 - Single user mode  
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)  
# 3 - Full multiuser mode  
# 4 - unused  
# 5 - X11  
# 6 - reboot (Do NOT set initdefault to this)

Picture of Benjamin Cane

Benjamin is a Systems Architect working in the financial services industry focused on platforms that require Continuous Availability. He has been working with Linux and Unix for over 10 years now and has recently published his first book; Red Hat Enterprise Linux Troubleshooting Guide.


Identify, capture and resolve common issues faced by Red Hat Enterprise Linux administrators using best practices and advanced troubleshooting techniques

What people are saying:
Excellent, excellent resource for practical guidance on how to troubleshoot a wide variety of problems on Red Hat Linux. I particularly enjoyed how the author made sure to provide solid background and practical examples. I have a lot of experience on Red Hat but still came away with some great practical tools to add to my toolkit. - Amazon Review

Sponsored by