Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the principle of runlevel in linux

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

What is the principle of runlevel in linux? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

The Linux system has 7 runlevels (runlevel)

Runlevel 0: system shutdown state, system default runlevel cannot be set to 0, otherwise runlevel 1: single user working state, root authority, for system maintenance, disable remote login runlevel 2: multi-user state (no NFS) runlevel 3: complete multiuser state (with NFS), enter console command line mode runlevel 4: system is not in use Keep the runlevel 5:X11 console, log in to the graphical GUI mode, runlevel 6: the system shuts down and restarts normally, the default runlevel cannot be set to 6, otherwise it cannot be started normally

The principle of the run level:

1. There are many server scripts under the directory / etc/rc.d/init.d, generally called service.

2. Under / etc/rc.d, there are seven directories named rcN.d, corresponding to the seven running levels of the system.

3. There are some symbolic link files in the rcN.d directory. These link files all point to the service script files in the init.d directory. The naming rules are Kroomnn + service name or Signornnn service name, where nn is a two-digit number.

4. The system will enter the corresponding rcN.d directory according to the specified run level, and retrieve the linked files in the directory according to the order of file names

For files that start with K, the system will terminate the corresponding service

For files that start with S, the system will start the corresponding service

5. To view the runtime level: runlevel

6. Enter other running levels for: init N

7. In addition, init 0 shuts down and init 6 restarts the system.

In addition, when you use runlevel to view the run level, the results show the previous run level and the current run level. If the previous run level is N, then there is no run level before (maybe just power on).

The answer to the question about what is the principle of the running level in linux is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report