Installation guide

operate the system at a lower runlevel to perform diagnostic tasks, like fixing disk corruption in
runlevel 1.
The characteristics of a given runlevel determine which services are halted and started by init. For
instance, runlevel 1 (single user mode) halts any network services, while runlevel 3 starts these
services. By assigning specific services to be halted or started on a given runlevel, init can quickly
change the mode of the machine without the user manually stopping and starting services.
The following runlevels are defined by default under Red Hat Enterprise Linux:
0 — Halt
1 — Single-user text mode
2 — Not used (user-definable)
3 — Full multi-user text mode
4 — Not used (user-definable)
5 — Full multi-user graphical mode (with an X-based login screen)
6 — Reboot
In general, users operate Red Hat Enterprise Linux at runlevel 3 or runlevel 5 — both full multi-user
modes. Users sometimes customize runlevels 2 and 4 to meet specific needs, since they are not used.
The default runlevel for the system is listed in /etc/inittab. To find out the default runlevel for a
system, look for the line similar to the following near the top of /etc/inittab:
id:5:initdefault:
The default runlevel listed in this example is five, as the number after the first colon indicates. To
change it, edit /etc/inittab as root.
Warning
Be very careful when editing /etc/inittab. Simple typos can cause the system to become
unbootable. If this happens, either use a boot diskette, enter single-user mode, or enter rescue
mode to boot the computer and repair the file.
For more information on single-user and rescue mode, see the chapter titled Basic System
Recovery in the Red Hat Enterprise Linux Deployment Guide.
It is possible to change the default runlevel at boot time by modifying the arguments passed by the
boot loader to the kernel. For information on changing the runlevel at boot time, refer to Section 9.8,
Changing Runlevels at Boot Time” .
33.4 .2. Runlevel Ut ilit ies
One of the best ways to configure runlevels is to use an initscript utility. These tools are designed to
simplify the task of maintaining files in the SysV init directory hierarchy and relieves system
administrators from having to directly manipulate the numerous symbolic links in the subdirectories
of /etc/rc.d/.
Chapt er 33. Boot Process, Init , and Shut down
34 5