In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the CentOS boot mode setting inittab example analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
English explanation in / etc/inittab under CentOS:
This file describes how the INIT process should set up the system in a certain run-level.The inittab file describes which processes are started at bootup and during normal operation.
In popular terms, it is to control some programs and levels when Linux starts.
The English explanation of run-level:
# 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)
The translation above means:
# 0-stop (never set initdefault to 0)
# 1-single user mode
# 2-Multi-user, no NFS (no network)
# 3-full multiuser mode (standard runlevel, which is actually text mode)
# 4-not used
# 5-X11 (xwindow)
# 6-restart
All valid statements in the inittab file follow the following format:
Id:runlevels:action:process
Id: is the identification name, which can be named at will. Within 4 characters, it is important to note that the identification name cannot be repeated. It is unique.
Runlevels: indicates that this line applies to those levels to run (the six levels shown above); in addition, the sysinit, boot, and bootwait processes ignore this setting. You can choose more than one item. For example, if you want to run 1, 2, 4 and 3 levels, write it as 123
Action: indicates the way in which the init should run the command of the process field when entering the corresponding runlevels. The commonly used field values and explanations are in the appendix.
Respawn: indicates that init should monitor this process and should be restarted even after it ends.
Wait: init should run this process once and wait for it to finish before taking the next step.
Once: init needs to run this process once.
Boot: runs with the system up, so the runlevel value is not valid for it.
Bootwait: runs with the system up, and init should wait for it to finish.
Off: it doesn't make any sense.
Initdefault: the default run level after the system is booted; since entering the corresponding run level activates the process at the corresponding level, it doesn't make any sense to specify the process field. If this record does not exist in the inittab file, the runlevel entered is asked on the console when the system boots.
Sysinit: the command that is ready to run when the system starts. For example, this command will clear / tmp. You can check the / etc/rc.d/rc.sysinit script to see what actions it runs.
Powerwait: allows init to shut down the system when the power is cut off. Of course, there is U P S and software that monitors the U P S and notifies the init that the power has been cut off. This option is not listed by default in RH linux.
Powerfail: same as powerwait, but init does not wait for the running process to finish. This option is not listed by default in RH linux.
Powerokwait: the action to be performed by init when the power monitoring software reports "Power back up".
Powerfailnow: the action to be performed by init is different from that of powerwait/powerfail when it is detected that ups is about to run out of power.
Ctrlaltdel: allows init to restart the system when the user presses C trl + A lt + D el on the console keyboard. Note that if the system is placed in a public place, the system administrator can configure the C t r l + A l t + D e l key combination for other behaviors, such as ignore, etc. I am set to print an abusive sentence. Kbrequest: monitoring the actions taken when a particular keyboard combination is pressed is not yet perfect.
Ondemand: A process marked with an ondemand runlevel will be executed whenever the specified ondemand runlevel is called. However, no runlevel change will occur (ondemand runlevels are'asides, 'baked dudes and' c')
Process: the program that is executed
For example:
Id:3:initdefault: # means to enter command line mode after startup
X:5:once:/etc/X11/prefdm-nodaemon # means to execute prefdm-nodaemon once in xwindow mode after startup
Actual combat experience:
If you want to boot directly into "command line mode", edit the / etc/inittab file and set it to id:3:initdefault:
If you want to enter window mode directly, set it to id:5:initdefault:
Thank you for reading this article carefully. I hope the article "sample Analysis of CentOS Startup Mode setting inittab" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.