The shutdown command is the most commonly used shutdown command, which can be used not only to shut down the system immediately, but also to shut down the system Linux shutdown command at a specified time shutdown
Shutting down, rebooting the system
Linux is a multi-user, multitasking system that can cause user data loss in the system if the system is shut down or restarted incorrectly. It is possible that the user is performing a critical operation or operation, etc., and if the system is closed without prompting, the user will not be able to save the current data, resulting in data loss. Therefore, you should master the correct way to shut down and restart the system to avoid data loss.
Shutdown to shut down the system command
The shutdown command is the most commonly used shutdown command, which can be used not only to shut down the system immediately, but also to shut down the system at a specified time.
(1) Shut down the system after 1 minutes:
# shutdown-h 1
Because administrator privileges are required to shut down and restart the system, the system command should be shut down and restarted as root user, such as shutdown.
To shut down the system immediately:
# shutdown-h Now
(2) Specify the time to shut down the system:
# shutdown-h 15:30
When the root user issues a shutdown instruction, other users in the system can get the following prompt:
The system is going under for system halt in 2 minutes!
If you get this message, the user should immediately stop the job in progress, save the necessary data, and then exit the system.
(3) The shutdown command can also be used to reboot the system:
# shutdown-r 2
The system will restart after 2 minutes.
If more than one user is using the system, the shutdown command should be used when shutting down the system, and the method of delayed shutdown is used to avoid data loss. Reprinted from: http://www.jb51.net/LINUXjishu/55056.html
Linux shutdown Shutdown System command usage introduction (RPM)