About Linux shutdown and restart commands. In fact, the first article should write about Linux installation and hard disk partitioning. I believe that the most important part of Linux interface installation is the hard disk partition. This is completely different from Windows
, so I will use it next time. >Tutorials
Additional! Let me talk about Linux shutdown and restart this time!
Linux centos restart command: 1, reboot2, shutdown -r now restart immediately (used by the root user) 3, shutdown -r 10 automatically restart after 10 minutes (root user) 4, shutdown -r 20:35 Restart at 20:35 (used by the root user). If the restart is set by the shutdown command, you can use the shutdown -c command to cancel the restart.
Linux centos shutdown command:
1, halt Shut down immediately 2, poweroff shut down immediately 3, shutdown -h now Shut down immediately (used by the root user) 4, shutdown -h 10 10 minutes after the automatic shutdown If you set the shutdown through the shutdown command, you can use the shutdown -c command to cancel the restart
1.shutdown
The shutdown command safely shuts down the system. Some users will shut down Linux by directly disconnecting the power supply, which is very dangerous. Because linux and windows are different, there are many processes running in the background, so forcible shutdown may result in data loss of the process, making the system unstable, and even in some systems, the hardware device will be damaged. Using the shutdown command before the system is shut down, the system administrator will notify all logged-in users that the system will be shut down. And the login command will be frozen, ie the new user can no longer log in. It is possible to shut down directly or delay the system for a certain period of time, and it may be restarted. This is determined by all the processes that receive the signal from the system. This allows programs like vi to have time to store documents that are currently being edited, while programs like mail and news can leave normally. The shutdown to perform its job is to send a signal to the init program, asking it to change the runlevel. Runlevel 0 is used to stop [halt], runlevel 6 is used to reactivate the [reboot] system, and runlevel 1 is used to get the system into a state where management can be performed; this is preset, assuming no -h There is also no -r parameter for shutdown. To find out what actions have been taken during a halt or reboot, you can see these runlevels related information in this file /etc/inittab.
shutdown Parameter Description:
[-t] Tells init how long to shut down before changing to other runlevels. [-r] Restart the calculator. [-k] does not really shut down, just send a warning signal to each login [login]. [-h] Turn off the power [halt] after turning off the power. [-n] Instead of init, shut yourself down. This option is discouraged and the consequences of this option are often not always what you expect. [-c] cancel current process Cancel the shutdown program currently being executed. So of course this option has no time parameters, but you can enter a message for explanation, and this information will be sent to each user. [-f] Ignore fsck when restarting the calculator [reboot]. [-F] Force fsck when restarting the calculator [reboot]. [-time] Set the time before shutdown [shutdown].
2.halt—-The simplest shutdown command
In fact, halt is to call shutdown -h. When halt is executed, the application process is killed, the sync system call is executed, and the kernel system stops when the file system write operation is completed. Parameter Description: [-n] Prevents the sync system call. It is used to fix the root partition with fsck to prevent the kernel from overwriting the repaired super block with the old version of the superblock. [-w] is not a real reboot or shutdown, just write wtmp[/var/log/wtmp] records. [-d] Do not write wtmp records (included in option [-n]). [-f] Forced shutdown or restart without calling shutdown. [-i] Turn off all network interfaces before shutting down (or restarting). [-p] This option is the default option. It is to call poweroff when shutting down. 3. The working process of rebootreboot is almost the same as that of halt, but it causes the host to restart, and the halt is shutdown. Its parameters are similar to those of halt.
4.initinit is the ancestor of all processes, its process number is always 1, so sending a TERM signal to init will terminate all user processes, daemons and so on. Shutdown is to use this mechanism. Init defines 8 runlevels, init 0 is shutdown, and init 1 is restart. About init can be a long story, and will not be described here. In addition, the telinit command can change the running level of init. For example, telinit -iS can make the system enter single-user mode, and can not get the information and waiting time when using shutdown.
Freedom blog blog to share these, will later add the installation and use of the lamp tutorial, of course, starting from Linux
A flash drive is one of the most useful tools a person can have. With it, you can back up critical d
Now let us use the two digital tubes on the experiment board to do a cycle to display the 00~99 numb
The Linux operating system has been around for 20 years without knowing it. Just 20 years ago, just
Enterprise customers install SCOM2012 behind the constantly generated alarms, performance, informat
Win7 boom will continue until 2013
How to reset MySQL ROOT password under Linux
Fedora Linux 8 system JDK 6.0 configuration method
VMware Workstation Installs Linux System
Introducing the Linux hard disk system to establish partition steps
Common file transfer commands and usage methods in Linux
7 urgent troubleshooting methods for Linux common faults
Linux manual adjustment date time
Xen virtual machine installation practice
linux stack of neighborhood subsystem (two related processes)
The whole process of automatically generating Makefile is detailed.
Add a right-click menu shortcut group to Win7 and Win8
Win8.1 how to close the automatic update
How to modify the Trustedinstaller permission file for Win7
U disk inserted win7 system computer display free space 0KB how is the matter
What should I do if win10 runs slowly? Win10 slow speed solution
How to burn a downloaded ISO file?
Tips for improving WinXP boot speed
Linux configuration SSH service method