In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use the Linux system init command, Xiaobian thinks it is quite practical, so share it with you as a reference, I hope you can gain something after reading this article.
The init command is a process initialization tool under the Linux operating system. The init command is one of the indispensable programs in the Linux operating system.
Init is one of the indispensable programs in Linux system operation. The so-called init process is a user-level process started by the kernel. After the kernel boots itself (it has been loaded into memory, started running, initialized all device drivers and data structures, etc.), the boot process is completed by starting a user-level program, init. So,init is always the first process (its process number is always 1). The kernel looks for init in several places where it has been used in the past, and its correct location (for Linux systems) is/sbin/init. If the kernel cannot find init, it tries to run/bin/sh, and if it fails, the system fails to boot.
Second, init is divided into 7 levels, and the meanings represented by these 7 levels are as follows: #init 0 -shutdown (Never set initdefault to 0)#init 1 -Single user mode, root only maintenance #init 2 -Multiple users, NFS cannot be used (Net File System) No networking #init 3 -Full multi-user mode (standard run-level) #init 4 -Safe mode #init 5 - X11 (xwindow) graphical interface mode #init 6 -restart (do not set initdefault to 6) three, boot default mode setting way when we have interface mode exit, boot again into, or interface mode, we want to no matter what mode we exit, in each boot into the default is command line mode, how to set it? The method is as follows: There is a directory with files under CentOS system: /etc/inittab
1. # inittab This file describes how the INIT process should set up 2. # the system in a certain run-level. 3. # 4. # Author: Miquel van Smoorenburg, 5. # Modified for RHS Linux by Marc Ewing and Donnie Barnes 6. # 7. # Default runlevel. The runlevels used by RHS are: 8. # 0 - halt (Do NOT set initdefault to this) 9. # 1 - Single user mode 10. # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) 11. # 3 - Full multiuser mode 12. # 4 - unused 13. # 5 - X11 14. # 6 - reboot (Do NOT set initdefault to this) 15. # 16. id:3:initdefault: Look at the code on line 16, where you can set the default boot mode. If it is set to id:3:initdefault: this means that the default boot mode is command line mode. If set to id:5:initdefault: This represents the default GUI mode of Qi Dongwei.
Note: Do not set the default value to 0 or 6. Because 0 means shutdown and 6 means restart. If set to one of these two, it will shut down and restart repeatedly. Remember!
About "Linux system init command how to use" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.
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.