Home Linux Basics Runlevels in Linux

Runlevels in Linux

by SupportPRO Admin

Runlevel is a preset operating state on a Unix-like operating system. A run-level is a software configuration of the system that allows only a selected group of processes to exist. A system can be booted into (i.e., started up into) any of several run-levels, each of which is represented by a single-digit integer. Each run-level designates a different system configuration and allows access to a different combination of processes (i.e., instances of executing programs).

Different Runlevels in Linux

A penguin working on a computerInit can run the system in one of seven run-levels. These run-levels are 0-6 and S or s. The system runs in only one of these run-levels at a time. Typically these Runlevels are used for different purposes. Run-levels 0, 1, and 6 are reserved. For Redhat Linux version 6, the run-levels are:

0 – halt
1 – Single user mode
2 – Multiuser, without NFS (The same as 3, if you don’t have networking)
3 – Full multiuser mode
4 – unused
5 – X11
6 – Reboot

Commands to check current run level :

#who -r

To change the run level :

# init (runlevel number)

eg: init 1
will run the single-user mode

To change the default run level, edit /etc/inittab file, and edit entry initdefault:

# vi /etc/inittab

Set initdefault to 5, so that you can boot to X11 mode next time when Linux comes up:

id:5:initdefault:

Save and close the file. Reboot the system to see changes:

# reboot

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Comment