Linux define the runlevel and determine which runlevel my system is currently in
Q. How to define the Linux system runlevel and how do I determine which runlevel my system is currently in?
A. You need to use runlevel command to find the current and previous system runlevel. Usaully 0-6 runlevel are used by all Linux distributions:
=> 0 : Halt system
=> 1 : Take system to single-user mode (good for Linux system maintenance)
=> 2 : User defined or distribution like Debian use it
=> 3 : Full multi-user mode (text mode login)
=> 4 : Not used/user-defined
=> 5 : Full multi-user GUI mode login
=> 6 : Reboot system
Please note that runlevels 0, 1, and 6 are reserved. Runlevel 0 is used to halt the system, runlevel 6 is used to reboot the system, and runlevel 1 is used to get the system down into single user mode.
Task: Determine which runlevel my system is currently in
Type runlevel command:
$ runlevel
Output:
N 3
runlevel command reads the system utmp file (typically /var/run/utmp) to locate the runlevel record, and then prints the previous and current system runlevel on its standard output, separated by a single space. If there is no previous system runlevel, the letter N will be printed instead.
Task: Change runlevel
Use init command to change the runlevel. For example runlevel 1 is used to get the system down into single user mode:
# init 1
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- Linux change the runlevel for a server without rebooting
- How to Linux disable X Windows KDE during system boot
- How to: Linux display remote X application over telnet session
- Debian or Ubuntu Linux runlevel configuration tool to start service
- update-rc.d like command on Redhat Enterprise / CentOS Linux
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!



Recent Comments
Yesterday ~ 6 Comments
Yesterday ~ 68 Comments
Yesterday ~ 8 Comments
Yesterday ~ 7 Comments
Yesterday ~ 2 Comments