Command
"who -r"should be run when you are not sure on which runlevel your server is running as its useful to find the current server runlevel.
Quote:
root@ [~]# who -r
run-level 3 2010-04-28 01:51 last=S
|
In above output shows current runlevel is 3. The main runlevels are from 0 – 6 in Linux Server and explanation for runlevel from 0-6 is as follows.
Quote:
Runlevel 0: Halt server
Runlevel 1: Single user mode
Runlevel 2: Basic multi-user mode without networking.
Runlevel 3: Full multi user mode.
Runlevel 4: Not used
Runlevel 5: Multi user mode with Graphical User Interface
Runlevel 6: Reboot server.
|
Runlevels 0, 1, and 6 are reserved. Runlevel 0 used to halt the server, runlevel 1 is used to get server down into single user mode and runlevel 6 used to reboot the server. You can change the runlevel as per your requirement by using init command from shell.
For example, if you want to set runlevel 1 then run following command from shell.