Linux

All about Runlevel

Sending
User Rating 5 (1 vote)

Runlevels  are meant for specifying different configuration of running services. With the help of runlevel we can control the installed services.
Runlevels are also available in windows system but it is very complex to set in windows.

There are 6 run levels also called init level.

  1. Runlevel 0 is for shutdown phase
  2. Runlevel 1 is for maintenance mode. This is single User mode, and very basic command can run in this level
  3. Runlevel 2 starts most of the services except the networking part. Allows multiple user to login.
  4. Runlevel 3 is used for server purpose. Starts all the services except X window system
  5. Runlevel 4 is same as level 3 but more services can be added. Generally not in use.
  6. Runlevel 5 is what we generally enter into Linux system. Allows everything with graphics.
  7. Runlevel 6 is for reboot.

Like Runlevel 1 in linux is same as safe mode in windows. The init file configuration is stored in the /etc/inittab file. Open this file in Vi editor and you will see the init level. Here you can change the default value of runlevel. When you  will open this file, you will see this line

id:3:initdefault:

Here 3 denotes the runlevel. You can change the number and then restart the system. Never set the number to 0 ot 6 because these number are for shutdown and reboot process.

I am not using Linux now so I cant show you my configuration file but in few days i will install linux and then paste the output of inittab.

You can check the runlevel of your system with the command   “who –r”
You can also change the runlevel with the help of the command.

init<runlevel>

Try init6, it will just restart your system.

Share your Thoughts