Stop the system 15 minutes from now.
Use a standard command that can notify logged-in users.
Which command is appropriate?
shutdown accepts +minutes for a relative time. A scheduled shutdown can commonly be canceled with shutdown -c.
Detailed explanation
halt +15Incorrect. halt does not use this standard relative scheduling syntax.
Incorrect. halt does not use this standard relative scheduling syntax.
reboot 15Incorrect. reboot is not the scheduled shutdown command here.
Incorrect. reboot is not the scheduled shutdown command here.
sleep 15; poweroffIncorrect. A shell sleep is not the managed, notifying shutdown workflow.
Incorrect. A shell sleep is not the managed, notifying shutdown workflow.
shutdown -h +15Correct. shutdown -h +15 schedules a halt in 15 minutes.
Correct. shutdown -h +15 schedules a halt in 15 minutes.
Try it yourself
An example you can run in a temporary verification environment.
shutdown --helpExpected result
+m形式の時刻指定。予約は実行しないKey points
- +15 means 15 minutes
- Scheduled shutdown
- User notification
Notes
- Environment: systemd systemctl互換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.