Difference between revisions of "Redhat: Grub runlevels"
Jump to navigation
Jump to search
(Created page with "== Run Levels {| class="wikitable" |- |0 |Halt |- |1 |Single user |- |2 |Multiuser, some networking, command line |- |3 |Multi User, Netwoking, Command Line |- |4 |Unused |- ...") |
|||
| Line 1: | Line 1: | ||
| − | == Run Levels | + | == Run Levels == |
| + | |||
| + | There are seven main run levels available. Each run level sets what services are available. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 24: | Line 26: | ||
|Reboot | |Reboot | ||
|} | |} | ||
| + | |||
| + | == Switch Between Run Levels == | ||
| + | |||
| + | The default run level is defined in /etc/inittab. It contains one line. Changing the number will change the run level the system boots into, in this case the GUI will be started if available. The default run level should never be set to 0 or 6. | ||
| + | |||
| + | <syntaxhighlight> | ||
| + | id:5:initdefault: | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | To check the current run level run the 'runlevel' command | ||
| + | |||
| + | <syntaxhighlight> | ||
| + | [root@head ~]# runlevel | ||
| + | N 3 | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | The change the run level you can use the init or telinit commands. | ||
| + | |||
| + | <syntaxhighlight> | ||
| + | [root@head ~]# init 3 | ||
| + | 5 3 | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | If you were to set the run level to 0 the system would shut down, level 6 would cause the system to reboot. | ||
Latest revision as of 13:01, 6 September 2013
Run Levels
There are seven main run levels available. Each run level sets what services are available.
| 0 | Halt |
| 1 | Single user |
| 2 | Multiuser, some networking, command line |
| 3 | Multi User, Netwoking, Command Line |
| 4 | Unused |
| 5 | X11 / GUI |
| 6 | Reboot |
Switch Between Run Levels
The default run level is defined in /etc/inittab. It contains one line. Changing the number will change the run level the system boots into, in this case the GUI will be started if available. The default run level should never be set to 0 or 6.
id:5:initdefault:To check the current run level run the 'runlevel' command
[root@head ~]# runlevel
N 3The change the run level you can use the init or telinit commands.
[root@head ~]# init 3
5 3If you were to set the run level to 0 the system would shut down, level 6 would cause the system to reboot.