How to change/set the default runlevel – Unix/Linux

The runlevel is specified in the /etc/inittab file. Different runlevels and details are listed below:

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 default runlevel means the runlevel of the Linux system which is appearing by-default after a reboot.
You can findout the current runlevel by executing the following command:

grep id:  /etc/inittab 


[[email protected] ~]# grep id:  /etc/inittab 

How to change the default runlevel?
you can change it simply by editing the line which has the runlevel id:

vi /etc/inittab

Then reboot to get the changes which you have made.

That’s it..!! 🙂

Post navigation

Arunlal Ashok

Operations Engineer at Endurance International Group. Linux lover. Like to play on Linux console. I started this blog to share and discuss Linux thoughts.

Always happy for an open discussion! Write to arun (@) crybit (dot) com. Check about me for more details. About this blog and our strong members, check The team
We like to travel. Our travelogues are published at Trip Mentor

Leave a Reply

Your email address will not be published. Required fields are marked *