Linux shutdown command: sudo shutdown now for immediate halt, sudo reboot for restart. systemd-based systems can use systemctl poweroff / systemctl reboot. Schedule with +minutes (e.g., shutdown +5) or HH:MM (e.g., shutdown 23:00). The team that uses shutdown over poweroff/reboot for servers gets the broadcast warning message to logged-in users.
Table of contents
- shutdown command
- reboot command
- poweroff
- halt
- Schedule a shutdown
- systemd equivalents
- Remote servers: don’t lock yourself out
- FAQ
shutdown command
sudo shutdown now # halt immediately
sudo shutdown -h now # halt immediately (explicit halt)
sudo shutdown -r now # reboot immediately
sudo shutdown +5 # halt in 5 minutes
sudo shutdown 23:00 # halt at 11pm
sudo shutdown -c # cancel scheduled shutdown
The team that uses shutdown over poweroff/reboot has a warning message broadcast to logged-in users.
reboot command
sudo reboot
sudo systemctl reboot
The team that uses reboot has the standard restart. systemctl reboot is the systemd-native equivalent.
poweroff
sudo poweroff
sudo systemctl poweroff
The team that uses poweroff has the standard halt. systemctl poweroff is systemd-native.
halt
sudo halt
Halt (don’t power off). The team that uses halt is on servers with IPMI/BMC for remote power. Most modern systems have halt -p which is the same as poweroff.
Schedule a shutdown
# In 5 minutes
sudo shutdown +5 "System update at 23:00 - will be back at 23:30"
# At specific time
sudo shutdown 23:00 "Scheduled maintenance"
# Cancel
sudo shutdown -c
The team that schedules maintenance has logged-in users warned.
systemd equivalents
On systemd systems, all of these work:
sudo systemctl poweroff
sudo systemctl reboot
sudo systemctl halt
The team that uses systemctl has unified shutdown/reboot.
Remote servers: don’t lock yourself out
For cloud servers (AWS, GCP, Azure):
- Use serial console or cloud provider’s restart mechanism.
- Verify SSH access is up after reboot.
- Have monitoring that catches if the server doesn’t come back.
The team that has cloud server reboots uses cloud’s restart mechanism (graceful shutdown through cloud API).
FAQ
What’s the difference between shutdown and poweroff?
shutdown: broadcasts warning, scheduled by default. poweroff: immediate. The team that uses shutdown for servers has user warnings.
Can I cancel a scheduled shutdown?
Yes - sudo shutdown -c.
How do I shutdown from SSH?
Just run the command. The SSH session drops when shutdown completes. The team that has serial console has fallback access.
What about init 0?
init 0 is the legacy SysV command. Works on systemd via compatibility. The team that uses systemctl has the modern way.
How do I schedule a recurring shutdown?
Cron: 0 23 * * * /sbin/shutdown now. The team that uses cron has scheduled reboots.
If you are sizing the infrastructure for the kind of project this post covers, the RunxBuild hosting calculator is the right place to model the line items. The compute, the memory, the storage, the bandwidth, the database - each one is a separate number, and the team’s mental model for the platform is the sum of those numbers. The RunxBuild dashboard is where the team sees the actual usage in one place.
Useful related references: