A future shutdown or reboot has already been scheduled.
Cancel it and leave the system running.
Which command is appropriate?
shutdown -c cancels a scheduled shutdown or reboot. Some implementations also accept a cancellation message.
Detailed explanation
shutdown -rIncorrect. -r schedules or requests a reboot rather than cancelling one.
Incorrect. -r schedules or requests a reboot rather than cancelling one.
shutdown -kIncorrect. -k broadcasts a warning without actually shutting down.
Incorrect. -k broadcasts a warning without actually shutting down.
shutdown -hIncorrect. -h requests halt or poweroff.
Incorrect. -h requests halt or poweroff.
shutdown -cCorrect. -c cancels the pending shutdown.
Correct. -c cancels the pending shutdown.
Try it yourself
An example you can run in a temporary verification environment.
shutdown --help 2>&1 | grep -E -- '-c|cancel'Expected result
取消オプションの説明。実際の予約や取消は行わないKey points
- -c means cancel
- -k only sends a warning
- Cancel before the scheduled time
Notes
- Environment: Linux / systemd shutdown互換コマンド
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.