How to use the SSH shutdown command
The shutdown command powers off or reboots your Linux server in a controlled way. In particular, it notifies running services and gives them time to save data and exit cleanly. Furthermore, you can shut down immediately, schedule a shutdown for a specific time, or cancel a scheduled shutdown. Use shutdown on VPS or dedicated servers via SSH. Note: shutdown requires root access; shared hosting accounts cannot use it.
Why use shutdown
Shutdown stops the system safely. Services that handle shutdown signals get notified and can close connections, flush caches, and exit properly. You can also schedule shutdowns to notify users or plan maintenance. Avoid pulling power or using halt or poweroff directly when a graceful shutdown is possible.
Shutdown immediately
To power off the server right away:
shutdown nowTo halt (stop the system) explicitly:
shutdown -h nowReboot the server
To restart instead of powering off:
shutdown -r nowOr use reboot for a quick restart. The -r option tells shutdown to reboot after stopping services.
Schedule a shutdown
To shut down at a specific time or after a delay:
shutdown 15:00Shuts down at 3:00 PM (server time). To shut down in 30 minutes:
shutdown +30Add -h for halt or -r for reboot: shutdown -r +15 reboots in 15 minutes. You can include a message: shutdown +10 "Server maintenance in 10 minutes".
Cancel a scheduled shutdown
To cancel a pending shutdown or reboot:
shutdown -cUse this if you scheduled a shutdown by mistake or if maintenance is postponed.
Send a fake shutdown warning
To broadcast a shutdown message to logged-in users without actually shutting down (for testing):
shutdown -k +5 "Test message"The -k option sends the warning but does not shut down. Useful when developing software that reacts to shutdown notifications.
Common use cases
Typical uses for SSH shutdown command on a VPS or dedicated server:
- Performing planned maintenance or updates
- Rebooting after kernel or system updates
- Powering off before moving or decommissioning a server
- Scheduling a reboot during low-traffic hours
Need more help?
Explore more SSH and hosting guides in our knowledgebase. JetHost web hosting offers VPS and dedicated servers with full root access for server management.


