![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMjgnBq4737-Bq0jTTwaKVqu2_iUvSsao5IuFwgsv1EQuj_vlLff5GVS7weOiI_AyAoe9M2r9iw1WoxNqbANlFRi4KB14P_Hrgjkz0WVglckTLO7-N2bxv1qQ_D73wzTq7jA27SQ02xJm2/s1600/Redhat.jpg)
Below is a method on how to change the default run level in Redhat Linux.
Login as root user and edit the file /etc/inittab
vim /etc/inittab
You will notice the below lines which indicate different levels supported. Note the last line initdefault. The init value entered here indicates the default run level.
# Default runlevel. The runlevels used by RHS are:
# 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)
#
id:5:initdefault:
By default X windows will be enabled i.e, value 5 . If you wish to disable and enable only command line option select value 3 and save the file.
Test it by rebooting the system and confirm.
Also you can execute the below init commands manually in a console as a root user to serve your purpose
- init 0 - (shuts down the system)
- init 6 - (reboots the system )
- init 3 - (opens command mode)
- init 5 - (opens X windows mode )
Hope this is useful to some beginners.