User Tools

Site Tools


Runlevels & Services

The runlevels used by RedHat are

Runlevel Description
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 (graphical interface)
6 reboot (Do NOT set initdefault to this)

Show the actual runlevel

The command runlevel shows the actual runlevel of the system:

N 3

Rebooting the server / runlevel 6

On RedHat Linux there is a spezial command for rebooting the server. Option -t for time is obligatory.

reboot -t now

Standard Linux command for rebooting:

init 6

Starting the XServer

If the server is in console mode, you can manually start the XServer for graphical mode:


Changing the standard runlevel (initdefault)

To change the standard runlevel change the file /etc/inittab as root.

vi /etc/inittab

This line indicates that the standard runlevel is 3, which means everything but the XServer is started.


Redhat chkconfig

  • To get a list of services that are configured to startup at run-level 3 (Redhat's default run-level), execute the following as root:
chkconfig --list | grep "3:on"
  • To find a specific service, for example “postgresql”, do the following:
chkconfig --list | grep "postgresql"
  • To add a service to the list of chkconfig managed services:
chkconfig –-add <service_name>
  • To remove a service from the list of chkconfig managed services:
chkconfig –-del <service_name>
  • Once you added a service to chkconfig you can define if the service should be started at bootup

Automatically started:

chkconfig <service_name> on


chkconfig <service_name> off
  • To manually start or stop a service, execute the following as root
service service_name [start|stop]

:?: For more information regarding Redhat's service management options, execute 'man chkconfig' from a shell.

/srv/ · Last modified: 2009/08/15 12:14 (external edit)