Home > php教程 > PHP开发 > Basic Linux commands - logout, shutdown, restart

Basic Linux commands - logout, shutdown, restart

高洛峰
Release: 2016-12-17 16:32:16
Original
1294 people have browsed it

  1. Logout, shutdown, restart
 
  Logout command of the system
 
  1. Logout Logout is the relative operation of login. After logging in to the system, if you want to leave the system, the user only needs to directly issue the logout command:
 
  [root@ localhost root]#logout
 
 Red Hat Linuxrelease 9(Shike)
 
 Kernel 2.4.20.8 on an i686
 
 Login: ← Return to the login screen
 
  2. Shutdown command to shut down or restart
 
 Shutdown command can be used to close All programs are restarted or shut down according to user needs.
 
  The parameter description is as follows:
 
  l Shut down immediately: The -h parameter causes the system to shut down immediately. The example is as follows:
 
 [root@localhost root]#shutdown –h now ← Request the system to shut down immediately
 
 l Specify the shutdown time: The time parameter can specify the shutdown time; or set the time after which the shutdown command will be run. The example is as follows:
 
[root@localhost root]#shutdown now ← Shut down immediately
  
  [root@localhost root]#shutdown +5 ← Shut down in 5 minutes
  
  [root@localhost root]#shutdown 10:30 ← Shut down at 10:30

 l Automatically restart after shutdown: -r parameter setting to restart after shutdown. The example is as follows:
 
 [root@localhost root]#shutdown -r now ← Shut down the system immediately and restart
  
  [root@localhost root]#shutdown -r 23:59 ← Specify to restart at 23:59
  
 3. Reboot command to restart the computer
 
As the name suggests, the reboot command is used to restart the system. Commonly used parameters are as follows:
 
  l -f parameter: Instead of shutting down according to the normal program operation, directly shut down the system and restart the computer.
 
  l -I parameter: Close all network interfaces before restarting.
 
Although the reboot command has parameters that can be used, generally you only need to run the reboot command alone



For more basic Linux commands - logout, shutdown, restart related articles, please pay attention to the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template