Stop Linux immediately for maintenance and use the standard shutdown procedure that notifies logged-in users.
You have the required administrative privileges.
Which command is appropriate?
shutdown -h now starts an immediate managed shutdown, allowing services to stop and filesystems to synchronize.
Detailed explanation
kill -9 1Incorrect. Killing PID 1 bypasses normal shutdown handling and can corrupt the system.
logoutIncorrect. logout ends the current shell only.
shutdown -h nowCorrect. shutdown -h now requests an immediate halt through the normal shutdown path.
exit --poweroffIncorrect. exit ends a shell and does not power off the host.
Try it yourself
An example you can run in a temporary verification environment.
shutdown --helpExpected result
停止時刻と-h等の使用法。停止操作は実行しないKey points
- Managed shutdown
- -h
- now
Notes
- Environment: systemd systemctl互換shutdown
- Use a disposable VM or test account when validating installation and SSH behavior.
- Exact command output can vary slightly by distribution and OpenSSH version.
Foundation review
Identify the scope
Signals, shell builtins, and shutdown commands affect different layers of the system.
Check the side effect
Use a maintenance window and confirm logged-in users and critical jobs before issuing a host-wide stop.