Your Webhosting Questions
Answered by the Webhosting Experts
Tags
...
...

Understanding Various runlevels in Linux OS

SysVinit is a system initialization program that runs when a Linux system boots up. It is responsible for starting and stopping various services and processes on the system. SysVinit uses a series of scripts called init scripts to control the behavior of different runlevels, which are modes of operation that define what services are available. SysVinit is one of the oldest and most widely used initialization systems for Linux, but it has some limitations and drawbacks, such as lack of parallelism, dependency management, and event handling.

In the table below, we’ve listed out the various runlevels (predefined sets of system states) you can find in SysVinit.

Runlevel Description
0 Halt
1 Single-user mode
2 Multi-user mode without NFS
3 Full multi-user mode
4 Unused
5 X11
6 Reboot

For example:

  • If you use a command line login screen, then you are in runlevel 3.
  • If you use a graphical login screen, you are operating in runlevel 5.

To Determine the init level you’re in, use the command runlevel.

Screenshot showing the results of the runlevel command.

The default runlevel can be viewed and persistently changed by editing the /etc/inittab file. If a change is made to the file, ensure to update the system using the command telinit q.

  • The /etc/initab file contains a line near the top of the file similar to the following, “id:5:initdefault:”. You can change the number in this line to enter the desired runlevel.
  • You will have to reboot the system for the changes to take effect.

Alternatively you can set the runlevel to a value as a one-time change using the telinit command followed by the run level #, such as telinit 6, which will reboot the device as shown in the example below.

Screenshot showing the results of the telinit 6 command.

Need More Personalized Help?

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your my.hivelocity.net account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here at: support@hivelocity.net. We are also available to you through our phone and live chat system 24/7/365.

Tags +
...