How to change runlevel in linux

FREQUENTLY ASKED QUESTIONS  (Linux)
Q: How to change runlevel in linux ?



Applicable to Fedora,CentOS,Redhat,etc
Display the current running runlevel

[root@server ~#]runlevel

Runlevels in linux
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
6   - reboot (Do NOT set initdefault to this)

The information about runlevel is stored in the file /etc/inittab. Edit this file to change runlevel.
[root@server ~#]vi /etc/inittab
#In the 26th line specify the required runlevel take effects after the next reboot.
id:5:initdefault:                         (Here 5 stands for "X11" runlevel)
# Can change the runlevel by editing 26th line and add the appropriate runlevel number.
Changing runlevel  (iniitab)
Restart the system to boot to the new runlevel
[root@server ~#]reboot

0 comments:

Related Posts Plugin for WordPress, Blogger...

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Coupons