Before You Shut Down a Remote Server
Warning: after a shutdown, the server is off and SSH no longer answers. You can only start it again from your provider's control panel. In most cases, such as after a kernel update or a configuration change, a restart is what you want. For that, read how to reboot a Linux server or use shutdown -r, shown below.
- Check who is logged in:
wholists other sessions. - Let running work finish: backups, database imports, and package upgrades.
- Take a snapshot before planned work on the system. See snapshot vs backup.
Shut Down Now
sudo shutdown -h nowsystemd stops services in order, writes pending data to disk, unmounts filesystems, and powers the machine off. These do the same:
sudo shutdown now
sudo poweroff
sudo systemctl poweroffSchedule a Shutdown
| Command | When |
|---|---|
sudo shutdown -h +10 | In 10 minutes. |
sudo shutdown -h 22:30 | At 22:30 server time. |
sudo shutdown | In one minute. |
With no time given, shutdown waits one minute. A time like 22:30 uses the server's clock; check it with date, because the server may run in a different time zone than you. Five minutes before a scheduled shutdown, systemd creates /run/nologin, and new logins are refused.
Cancel a Scheduled Shutdown
sudo shutdown -cThis cancels a pending shutdown or reboot that was scheduled with a time argument, such as +10 or 22:30.
Reboot Instead
sudo shutdown -r now
sudo shutdown -r +5-r restarts the server instead of leaving it off. All the timing options above work the same way, and shutdown -c cancels a scheduled reboot too.
Warn Logged-In Users
Text after the time is sent to every terminal:
sudo shutdown -h +15 "Maintenance: the server goes down in 15 minutes"To send a message without shutting down, use wall "text". sudo shutdown -k +15 sends the usual shutdown warning but does not shut anything down, which is useful for a test.
shutdown, poweroff, halt, and reboot
| Command | Result |
|---|---|
shutdown -h | Powers off, now or later. |
poweroff | Powers off now. |
halt | Stops the system; power may stay on. |
reboot | Restarts now. |
On current distributions these are all front ends to systemd. Avoid halt on a remote server: the machine stops but may not switch off, and it still has to be reset from the control panel.
Starting the Server Again
Log in to your provider's control panel and use the start or power-on action for the server. If it does not come up, open the console there to see the boot messages. For a dedicated server, the same panel or the server's management interface powers it on; the difference between the two server types is covered in VPS vs dedicated server.
A hard power-off from the panel is the same as pulling the plug. Use it only when the system no longer responds, because unsaved data can be lost.
If the Command Fails
- Must be root: run it with sudo.
- A service blocks the shutdown: systemd waits for it up to a time limit, then stops it. Check which one with
systemctl list-jobsfrom a second session. - Services missing after start: they were not enabled for boot; see how to list services with systemctl.
Updated:
Linux VPS with Full Root Access
MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.
More Guides
No Limits on Service or Support
You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

- 100% customer satisfaction goal
- Our own hardware
- 24/7 ticket and email support
- 4 countries with locations