Posted in RHCE

The Linux Runlevel

February 19, 2007 - No comment

I’m pretty sure they don’t provide the root password at the RHCE exam and ask you to deal with it :)

Runlevels :
* 0 - Halt the system
* 1 - Single-user mode
* 2 - Multi-user mode (without NFS)
* 3 - Multi-user mode
* 4 - Unused
* 5 - Multi-user mode, graphical login
* 6 - Reboot the system

Switch runlevel while the system is running (example : switch to runlevel 5) :
telinit 5

Boot in a different runlevel (say 5 again) :

LILO :
boot using “linux 5″

Grub :
Edit the kernel line by pressing “e” and add “5″ to the end of that line. Press enter then “b” to boot with the new parameter.

Changing the default runlevel :
Edit /etc/inittab and edit this line, replace 3 by desired runlevel
id:3:initdefault:

Resetting the root password :
- Boot in runlevel 1
- passwd root

You’re done.

Leave Comment

Please consider visiting the partners below if you enjoyed this article :

If this post saved you time and money, please consider checking my Amazon wishlist.

Before submitting, some rules :
- Is your comment related to the article ?
- You're having a problem ? Have you checked Google, other howtos, docs, manpages ?
- You're still having the problem ? Have you raised log verbosity, checked traces, ran tcpdump ?
- Have you checked your configuratoin for typo ?
Unless your comment is providing additional info or respect the rules above, DON'T comment.
If you don't understand what you are doing, I urge you to read the documentation, I'm not your free Level 1 helpdesk guy.