jump to navigation

How to boot into a specific Linux runlevel by default November 4, 2010

Posted by Tournas Dimitrios in Linux.
trackback

If you don’t already know, a runlevel is what Linux uses as a mode of operation.   A ‘runlevel’ defines the state of the operating system after power on.

Typically, Linux runlevels look like the following:

  • 0 – Halt (shutdown)
  • 1 – Single-User mode
  • 2-5 – Full multi-user mode with console logins and display manager if it’s installed
  • 6 – Reboot

On most Linux servers, the default runlevel will be set to runlevel 3. Multi-user mode and console logins only.  Whereas, most Linux desktops, the default runlevel will be set to runlevel 5.

If you want to boot into a specific runlevel every time your computer turns on, all you need to do is edit the /etc/inittab. For this example, we will change the runlevel from 3 to 5.

# vi /etc/inittab

Modify the line that looks like this:

id:3:initdefault:

And change the number 3, to 5.

id:5:initdefault:

Save the file.  Next time you reboot Linux will boot directly into your desktop window manager.

Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s