Command Introduction
Shutdown, poweroff, reboot, halt, init can be shut down, approximate usage.
/sbin/halt [-n] [-w] [-d] [-f] [-i] [-p] [-h] /sbin/reboot [-n] [-w] [-d] [-f] [-i] /sbin/poweroff [-n] [-w] [-d] [-f] [-i] [-h]
[root@linux ~]$ reboot --h usage: reboot [-n] [-w] [-d] [-f] [-h] [-i] -n: Not synchronized before stopping the system -w: Write only wtmp reboot record And leave -d: Do not write wtmp record -f: Force shutdown or restart -h: Let the hard disk in stand-alone mode -i: Close all network interfaces
Shutdown process
1. Refresh the hard disk Cache: 2. Record the restart event: (/var/run/utmp, /var/log/wtmp) 3. Kill all processes: 4. Finally restart the machine:
Shutdown example
# shutdown -h now # shutdown now # shutdown -h 2:30 'halt' #2点30 minutes shutdown, pay attention to the local time # halt -p # immediately shut down # init 0 # immediately switch the system running level to 0, ie shutdown # shutdown now #Switch to single-player mode (without any options)
Restart example
# shutdown -k now 'reboot' #Warning message, but no real shutdown .# shutdown -t5 -r now #Restart now, but between warning and deletion, delay 5 seconds.# Init 6 # Immediately switch the system run level to 6, ie reboot # shutdown -r +10 'reboot' #10 minutes restart # shutdown -c # cancel the previous shutdown command # shutdown -r now # immediately restart
shutdown Prepare
Linux is no better than Windows. If you can't shut down properly, it may cause file system corruption if you don't have time to write data back to the file. So pay attention before shutting down:
1. Observe the system status
Use the who command to view the online user with the netstat -a command, view the network connection status with the ps aux command, view the background execution program
2. Notify online users #shutdown -k now 'System will reboot in 30 minutes!'
3. Use the correct command # first to find out whether it is shutdown or restart, followed by the parameters
4. Note Data Synchronization #Sync to disk using sync data
Additional Notes
1. View the restart log
# last reboot
2. Remote boot machine
# ssh root@server /sbin/reboot # ssh root@192.168.0.1 /sbin/shutdown -r now
What is a process? A process is a running instance of an already launched executable. The process ha
ls is simply a list of file names in the directory, ll more detailed list of file types, file owner
The installation environment is Ubuntu13.10 version i386, the nginx server and mysql server have bee
Preparation before installation 1. kail linux 2.0 download (multiple versions of ISO) Downl
The difference between setting the environment variable configuration file under Linux
Centos6.5 x86 installation oracle 11g2r tutorial
Linux common users camouflage root users
Graphical explanation of the installation of Linux
Four shifting engines for the Googles BBR TCP congestion control algorithm
How to create and unzip zip, tar, tar.gz and tar.bz2 files under Linux
Linux pipeline and redirection
How to configure Chinese input method in Linux environment
Win10 Preview (Package Build9841/9860): Store app can add desktop shortcuts
Win10 Mobile Universal Edition Skype Messaging App Features Demo Video
Let Windows XP boot passwords be more powerful
How to join the Win10 system's Insider program
WP8.1 official version of the new features: native start screen folder
How to clear the cache of IS voice IS voice clearing cache method
Win10 10125 start menu and Xiaona can not open how to do?
Win10 Mobile Build 14327 get started video evaluation
How to uninstall the printer driver in win7 system computer?