Home >Operation and Maintenance >CentOS >How to shut down centos7?
How to shut down centos7: 1. [shutdown -h now] The computer will shut down immediately; 2. [shutdown -r now] The computer will restart immediately; 3. [shutdown -h 10] The computer will shut down in 10 minutes and is displayed on the logged-in user's current screen.
centos7 shutdown method:
Linux is mainly used in the server field, and a service is executed on the server It is never-ending and will not shut down unless encountering special circumstances. Unlike Windows, under Linux systems, many processes are executed in the background. Behind the screen, there may be many people working at the same time. If you press the power button directly, other people's data may be interrupted. What's more serious is that if you shut down improperly, in serious cases, the file system may be damaged, resulting in data loss.
If you want to shut down, you must ensure that no other users in the current system are logging in to the system. We can use the who command to check if there are other people logged in, or use the command ps -aux
to check if there are still background processes running. shutdown, halt, and poweroff are all shutdown commands. We can use the command man shutdown
to view its help documentation. For example, we run the following command to shut down.
shutdown -h 10
#The computer will shut down in 10 minutes and will be displayed in the current screen of the logged in user
shutdown -h now
#The computer will shut down immediately
shutdown -h 22:22
#The computer will shut down at this moment
shutdown -r now
#The computer will restart immediately
##shutdown -r 10 #Computer It will restart in 10 minutes.
reboot
centos tutorial
The above is the detailed content of How to shut down centos7?. For more information, please follow other related articles on the PHP Chinese website!