Linux CentOS shutdown and restart command details and practices Linux CentOS restart command: 1. reboot normal restart 2. shutdown-rnow restart immediately (used by root users) 3, shutdown-r10 through 10 minutes automatic restart (root user use) 4, shutdown-r20: 35 at the time of restart (roo Linux centos shutdown and restart command details and practice
Linux centos restart command:
1. reboot normal restart
2. shutdown-r now restarts immediately (used by the root user)
3. shutdown-r restarts automatically after 10 minutes (used by root users)
4. shutdown-r restart at (for root users)
If you use the shutdown command to set the restart, you can use the shutdown-c command to cancel the restart.
Linux centos shutdown command:
1. shut down halt immediately
2. power off immediately
3. shutdown-h now shut down immediately (used by the root user)
4. shutdown-h: shutdown automatically 10 minutes later
If you use the shutdown command to set shutdown, you can use the shutdown-c command to cancel the restart.
This is how the server is set up for the House network and Weihai Real Estate Network!
1. shutdown
The shutdown command safely shuts down the system. Some users disable linux by directly disconnecting the power supply,
This is very dangerous. Different from windows, linux runs many processes in the background, so force shutdown May
Will the process data be lost? Make the system unstable? In some systems, hardware is damaged.
And use the shutdown command before the system is shut down? The system administrator notifies all logged-on users that the system will be disabled.
And the login command will be frozen? That is, new users cannot log on again. Shutdown directly or with a certain delay
Are they all possible? It may also restart. This is the signal that all processes will receive from the system [signal 〕
. Does this allow programs like vi to have time to store the files currently being edited? For example
News programs can leave normally.
Shutdown is to send a signal [signal] to the init Program? It is required to change the runlevel.
Runlevel 0 is used to stop [halt 〕? Is runlevel 6 used to reactivate the [reboot] system?
Runlevel 1 is used to bring the system into a state where management work can be performed? Is this preset? If there is no-h
No-r parameter is provided to shutdown. If you want to know what has been done during the shutdown (halt) or re-boot (reboot) process
Action? You can view the runlevels related information in the/etc/inittab file.
Shutdown parameter description:
[-T] before changing to another runlevel? Tell init how long it will take to shut down.
[-R] restart the calculator.
[-K] isn't it true to shut down? Only a warning signal is sent to each login 〕.
[-H] power off after shutdown [halt 〕.
[-N] no init? Instead, shut down the server by yourself. Are you not encouraged to use this option? And the consequence of this option is always
Never always what you expected.
[-C] cancel current process cancels the currently running shutdown program. So of course this option does not exist.
Time parameter? But can I enter a message for explanation? This information will be sent to each user.
[-F] ignore fsck when restarting calculator [reboot.
[-F] forces the fsck when restarting the calculator [reboot.
[-Time] set the time before shutdown.
2. halt-the simplest shutdown command
In fact, halt calls shutdown-h. When halt is executed? Killing an application process? Execute sync system call?
After the file system writes, the kernel is stopped.
Parameter description:
[-N] how to prevent sync system calls? After fsck is used to fix the root partition? To prevent the kernel from using an earlier version
The level block (superblock) overwrites the repaired super block.
[-W] isn't it a real restart or shutdown? Write the wtmp (/var/log/wtmp) record.
[-D] do not write the wtmp record [included in option [-n 〕.
[-F] force shutdown or restart without calling shutdown.
Before [-I] shutdown [or restart? Disable all network interfaces.
[-P] This option is the default option. It is called poweroff when shutdown.
3. reboot
Is reboot working like halt? But does it cause host restart? While halt is shut down. It
The parameters are similar to those of halt.
4. init
Is init the ancestor of all processes? Its process number is always 1? Therefore, sending a TERM signal to init will terminate all
User process? Daemon. Shutdown uses this mechanism. Init defines eight runlevels ),
Is init 0 shutdown? Init 1 indicates restart. Can init be a long story? This is not described here. In addition
Can the telinit command change the running level of init? For example? Does telinit-iS enable the system to enter single-user mode?
The shutdown information and waiting time are not available.
How to change the root administrator password in linux
Log on as root (SSH operation)
Enter the passwd command and you will be prompted to enter the new password.
The password cannot contain any characters.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.