Linux Service

What are the run levels in Linux?



Before knowing to start or stop the services, let see the default runlevels in Linux. The following table will list runlevels an the user mode:
RunlevelsGeneric mode
0 halt
1Single user mode
2Multiuser, without Networking
3Full multiuser mode

Runlevels are used to specify different configurations of running services. Lets see these runlevels briefly.
Runlevel 0:
Halt. When entering this runlevel the shell prompt will usually shutdown the system and power off the machine. Note: Do NOT set initdefault to this.
Runlevel 1:
Single user mode. This level is used to asses repair or maintenance in the system. Being single user mode, this will not allow other users to login to the machine. It is nearly equivalent to Safe Mode in Windows.
Runlevel 2:
Multiuser mode without networking. This runlevel does not start the network file sharing service. It allows multiple users to login to the machine.
Runlevel 3:
Full multiuser mode. This runlevel is commonly used by servers. It loads all services except X windows system. This allows multiple users to login to the machine.
Runlevel 4:
Not used. This level is only used under special circumstances. By default, it will start more services than level3.
Runlevel 5:
X11. Full (GUI based) multi-user mode. This level contains everything. It will start GUI's, extra services for
printing, etc.,. It will support full muti-users. It is used generally on workstations.
Runlevel 6:
Reboot. It is reserved only for reboot. Once you have entered it, there will be no stopping. Note: Do NOT set initdefault to this.
Runlevels 2 and 3 are mainly used for Debugging purpose only, and are not used in normal operations. In Red Hat Linux, the default boot level is 3. When booting into an X Windows login, the default boot level is 5.
You can view the settings of default runlevel in /etc/inittab. The command color=brown>/sbin/chkconfig --list is used to display a list of all runlevels and services.

LINUX Services

Ask Questions

Ask Question