Thursday, November 6, 2008

Redhat Linux Runlevel

There are altogether eight runlevels in Redhat Linux, starting from runlevel 0 to runlevel 7 and runlevel S or s. Runlevels 7 to 9 are also valid, but not really documented, as the traditional UNIX variants don't use them.This article served as reference for the others Linux variants too, as most of them are same.When Redhat Linux boots up, the init process refers to /etc/inittab file for default runlevel booting. Normally, default Redhat Linux installation set to boot into runlevel 3 or runlevel 5 (if X windows is installed).After decide which runlevel to boot, Redhat Linux init process will executing runlevel specific initialization scripts files, located at /etc/rcN.d directory, where N refers to runlevel.To change the default runlevel during boot up, edit the /etc/inittab file and search for line begin with id: keyword. For example,id:2:initdefault: - default runlevel 2id:5:initdefault: - default runlevel 5Description of each different Redhat Linux runlevel
Runlevel 0
The halt system runlevel, indicates that the Redhat Linux is shutting down. Obviously, this runlevel should not becomes the default runlevel in /etc/inittab file.
Runlevel 1
Single user mode runlevel, indicates that only one user, and must be locally login in front of physical console. There are only very minimal set of functions loaded by the kernel at this runlevel, for example no networking function!Booting Redhat Linux into single user mode is ideal to perform system maintenance or repairing works.
Runlevel 2
Redhat does not use this runlevel, and it is user-definable runlevel. Having say that, it could be customized by user for this runlevel.In Debian, however, this is the default runlevel. Debian runlevel 2 to 5 are full multi-user mode.
Runlevel 3
Similar to Debian runlevel 2. Redhat Linux runlevel 3 is full multi-user mode without X windows
Runlevel 4
This is also an user-definable runlevel.
Runlevel 5
This is Redhat Linux full multi-user mode runlevel, with X windows system loaded.
Runlevel 6
This is Redhat Linux system reboot runlevel. Obviously, this runlevel should not be default runlevel as well.Related information:
Using the telinit command to change the system current runlevel without rebooting. For example, while at current system runlevel 5, executing telinit 3 will change to system runlevel 3 without rebooting the system.
Executing the runlevel command without argument to find out a line with two columns, where first column indicates previous system runlevel and second column indicates current system runlevel. If the previous runlevel are unknown, the character N printed.
How to add extra hard disk to Redhat Linux, and boot up into single user mode using LILO or GRUB
Search more related info with Google Search engine built-in

No comments: