In linux, the shutdown command is used to shut down and restart the server, but the following references are different.
Restart command:
1. reboot
2. shutdown-r now restarts immediately (used by the root user)
3. shutdown-r restarts automatically after 10 minutes (used by root users)
4. shutdown-r restart at (for root users)
If you use the shutdown command to set the restart, you can use the shutdown-c command to cancel the restart.
Shutdown reference
Shutdown parameter description:
[-T] before changing to another runlevel? Tell init how long it will take to shut down.
[-R] restart the calculator.
[-K] Isn't it true to shut down? Only a warning signal is sent to each login 〕.
[-H] power off after Shutdown [halt 〕.
[-N] No init? Instead, shut down the server by yourself. Are you not encouraged to use this option? In addition, the consequences of this option are not always what you expected.
[-C] cancel current process cancels the currently running Shutdown program. So this option certainly does not have a time parameter? But can I enter a message for explanation? This information will be sent to each user.
[-F] Ignore fsck when restarting calculator [reboot.
[-F] forces The fsck when restarting the calculator [reboot.
[-Time] set the time before shutdown
Shutdown command:
1. Shut down halt immediately
2. Power off immediately
3. shutdown-h now shut down immediately (used by the root user)
4. shutdown-h: shutdown automatically 10 minutes later
If you use the shutdown command to set shutdown, you can use the shutdown-c command to cancel the restart.
Parameter description:
[-N] How to Prevent sync system calls? After fsck is used to fix the root partition? To prevent the kernel from overwriting the repaired superblock with the old version of superblock.
[-W] Isn't it a real restart or shutdown? Write the wtmp (/var/log/wtmp) record.
[-D] Do not write the wtmp record [included in Option [-n 〕.
[-F] Force shutdown or restart without calling shutdown.
Before [-I] shutdown [or restart? Disable all network interfaces.
[-P] this option is the default option. Is to call poweroff when Shutdown