"Journey towards new learning"

RUN LEVELS IN LINUX

RUN LEVEL IN LINUX


Run levels define what kind of environment or service to run automatically or manually when the system boots up. Run level revolves around the idea that different system can be used in different ways. The run level can provide a specific role at each level. Sometimes administrator doesn't want to load the whole Linux os instead administrator can load the os with the minimal processes this is where the levels are defined.
Linux administrator may need to resolve or fix the Linux issues where the administrator can load the lower run level to diagnose.
There are total 7 run levels from 0 to 6, Once the system kernel loads, the init program reads the /etc/inittab file to check the behaviour for each run level. System boots in default run level which may be 3 or 5. if the system is without GUI then default run level is 3 and if the system boots up with GUI then default run level is 5. /etc/inittab is the file which has information about the run level which is going to be used. This spawns all other processes, It starts a daemon and the PID is 1.
The applications that are started by init is located in the /etc/rc.d directory.

Run Level
Mode
Action
0
Halt
Shuts down system
1
Single-User Mode
Does not configure network interfaces, start daemons, or allow non-root logins
2
Multi-User Mode
Multi user but without networking, doesn’t start network services
3
Multi-User Mode with Networking
Starts the system normally.
4
Undefined
Not used/User-definable
5
X11
As runlevel 3 + display manager(X)
6
Reboot
Reboots the system

You can use a utility to check what services are started at which run levels
~]$ chkconfig --list
There is a command to check the run level and switch between run levels
~]$ runlevel
~]$ runlevel xx

We can change the default run level in /etc/inittab file,
Warning
Be very careful when editing /etc/inittab. Simple typos can cause the system to become unbootable. If this happens, either use a boot diskette, enter single-user mode, or enter rescue mode to boot the computer and repair the file

========================================================================
Please comment below if you have any suggestion
========================================================================

I hope this has been informative for you. If it seems helpful then Like, Share and Don’t forget to subscribe and follow me for the upcoming posts
https://www.youtube.com/channel/UC0-p23p1xWsZsTXHUQ7CiJg
https://www.facebook.com/networkinginfo/
https://twitter.com/Dj1Pali
https://www.instagram.com/a_bhartiya_rider/
https://www.linkedin.com/in/dinesh-jangid-515b6a23/


No comments

Powered by Blogger.