In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of the running level of linux, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this linux running level article. Let's take a look at it.
Linux has seven operating levels: 1, "0", system downtime status; 2, "1", single-user working status; 3, "2", multi-user status; 4, "3", complete multi-user mode; 5, "4", system unused; 6, "5", graphical mode; 7, "6", system shutdown and restart normally.
The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
Run level of Linux:
Init is one of the indispensable programs in the operation of Linux system. The init process, which is a user-level process started by the kernel. The kernel will look for it in several places where init has been used in the past, and its correct location (for Linux systems) is / sbin/init. If the kernel cannot find init, it will try to run / bin/sh, and if it fails, the startup of the system will fail.
Linux has seven running levels (0: shutdown, shutdown mode, 1: single-user mode, 2: multi-user mode, 3: complete multi-user text mode, 4: system unused, reserved for general use, 5: graphical mode, 6: restart mode). The run level is the functional level that the operating system is currently running. This level ranges from 0 to 6 and has different functions.
Level specific description:
0: system shutdown (shutdown) mode, the default running level of the system cannot be set to 0, otherwise it cannot be started normally, and it will shut down automatically as soon as it is turned on.
1: single-user mode, root permission, for system maintenance, prohibit remote login, just like the secure mode login under Windows.
2: multi-user mode, no NFS network support.
3: complete multi-user text mode, with NFS, log in to the console command line mode.
4: the system is not in use, it is generally not used, and it can be used to do something in some special cases. For example, when the laptop battery runs out, you can switch to this mode to make some settings.
5: graphical mode, enter graphical GUI mode or GNOME, KDE graphical interface after login, such as X Window system.
6: the system shuts down and restarts normally, and the default running level cannot be set to 6, otherwise it cannot be started normally, and it will be rebooted all the time.
The standard Linux runlevel is 3 or 5
Runlevel principle:
1. There are many server scripts under the directory / etc/rc.d/init.d, commonly referred to as service
two。 Under / etc/rc.d, there are seven directories called rcN.d, corresponding to the seven run levels of the system.
The 3.rcN.d directory is full of symbolic link files that point to the service script files in the init.d directory, with the naming convention being Kbinnn + 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 file name order: for files starting with K (Kill), the system will terminate the corresponding service; for files starting with S (Start), the system will start the corresponding service.
5. To view the runlevel: runlevel
6. Enter other runlevels: initN, if init3, enter terminal mode, and init5 log into graphical GUI mode
7. In addition, init0 shuts down and init6 restarts the system.
The standard Linux runlevel is 3 or 5, and if it is 3, the system is in a multi-user state; if it is 5, the XWindow system is running. Different run levels have different uses and should be set according to their own situations. For example, if you lose your root password, you can set it up by booting the machine into a single-user state. Enter at the lilo prompt after startup:
Init=/bin/shrw
This allows the machine to enter run level 1 and hang the root file system as read and write. It will pass through all system authentication, let you use the passwd program to change the root password, and then boot to a new runlevel.
This is the end of the article on "what are the running levels of linux?" Thank you for reading! I believe you all have a certain understanding of the knowledge of "what is the operating level of linux". If you want to learn more knowledge, you are 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.