In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you the "linux system startup level example analysis", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and study the "linux system startup level example analysis" this article.
Linux run level
Enter Linux as an administrator and modify the file: / etc/inittab
Find "id:5:initdefault:" where 5 is X-window, which is the default run level
Linux runs at one level after startup, which are listed below:
0 system stop
1 single user system, no need to log in
2 multi-user system but does not support NFS, command line login
3 complete multi-user mode, command line login
4 unused
5x11 graphic mode, graphical mode login
6 restart the system
You can see the 0-6 level comments in the / etc/initab file, and the code snippets are as follows:
# Default runlevel. The runlevels used by RHS are:
# 0-halt (Do NOT set initdefault to this)
# 1-Single user mode
# 2-Multiuser, without NFS (The same as 3, if you do not have networking)
# 3-Full multiuser mode
# 4-unused
# 5-X11
# 6-reboot (Do NOT set initdefault to this)
1. Level 0
The system stops. Be careful not to set this level to the default mode, otherwise the system will automatically stop and cannot enter after each startup.
This runlevel is mainly used to close tasks, and each connection command in the rc0.d directory is a command at this level. When closed, these commands are executed one by one. They will kill all processes, turn off virtual memory and swap files, unmount file systems, and swap partitions.
The shutdown operation is quite different under DOS and Linux. At the DOS prompt, you can safely turn off the power directly. However, this cannot be done under Linux. Linux's file system is mounted at startup and unmounted at shutdown. This difference is the premise of the powerful function of Linux.
Under Linux, shut down, restart the computer by typing the command shutdown plus parameters, or restart by pressing the hotkey "Ctrl" + "Alt" + "Del".
two。 Level 1
Single user mode. This mode allows only one user to log in to all files in the rc1.d directory from the local computer to connect to this runlevel. This runlevel is generally used for system management and maintenance, such as upgrading Linux systems, installing new software, and so on.
In this mode, it can only be accessed by the administrator and other users cannot log in. Because at startup, the file system is loaded but the network is not loaded, you cannot log in through the network.
3. Level 2
Multi-user mode. Users can log in through the network. This mode is similar to mode 3 when the network is not supported, and all files in the rc2.d directory are connected to this level.
4. Level 3
Full multi-user mode. This is the default operation mode, in which all network service programs run together. Files recorded by rc3.d are connected to this level.
5. Level 4
No mode is used, and the rc4.d directory is connected to this level. This level is a user-defined run level that users can define on their own. If you want to run this level, you must drop the connection file in the rc3.d directory, just like the files in other rc*.d directories, and indicate whether to start or terminate the process.
6. Level 5
This level is used by running X Window under Linux. At this level, except that the named of the Internet's domain name server is different from that of level 3, the rest are the same.
7. Level 6
This is a run level for restarting the system. The rc6.d directory is connected to this level. Since you are rebooting, that is, shutting down the current system, but not turning off the power, the connection in this directory is basically the same as the connection under rc0.d with level 0. The difference is that although they all execute the halt command, the parameters passed to halt are different, so level 6 can restart the system.
The above is all the contents of the article "sample Analysis of linux system Startup level". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.