Shutdown VyOS Router
Shutdown Command
# Graceful shutdown
sudo poweroff
# Or
sudo shutdown -h now
# Or
sudo halt
Reboot Command
# Graceful reboot
sudo reboot
# Or
sudo shutdown -r now
# Force reboot (if system is hung)
sudo reboot -f
Scheduled Shutdown/Reboot
# Shutdown in 10 minutes
sudo shutdown -h +10
# Shutdown at specific time (24-hour format)
sudo shutdown -h 23:00
# Reboot in 5 minutes with message
sudo shutdown -r +5 "System maintenance reboot"
# Cancel scheduled shutdown
sudo shutdown -c
Before Shutdown Checklist
# 1. Save your configuration (IMPORTANT!)
configure
commit
save
exit
# 2. Check for active users/sessions
show system session
# 3. Check DHCP leases (optional)
show dhcp server leases
# 4. View system uptime before shutdown
show system uptime
Emergency Shutdown
If system is unresponsive:
# Force immediate shutdown (no graceful cleanup)
sudo poweroff -f
# Or use SysRq if kernel is responsive
echo b > /proc/sysrq-trigger
Check Power Status
# View system information
show system info
# Check uptime
show system uptime
# Monitor logs before shutdown
show log tail
Shutdown from Configuration Mode
If you’re in configuration mode:
# Exit configuration mode first
exit
# Then shutdown
sudo poweroff
Quick Reference
| Action | Command |
|---|---|
| Shutdown now | sudo poweroff |
| Reboot now | sudo reboot |
| Shutdown in X min | sudo shutdown -h +X |
| Reboot in X min | sudo shutdown -r +X |
| Cancel shutdown | sudo shutdown -c |
| Force shutdown | sudo poweroff -f |
Important Notes
⚠️ Always save configuration first:
configure
save
exit
✅ VyOS automatically saves on clean shutdown, but better to be safe!
📝 No confirmation prompt – shutdown happens immediately
🔌 Physical power – After shutdown, power off or unplug
Shutdown vs Reboot
poweroff– Shuts down and powers off (if supported)halt– Stops all processes but may not power offreboot– Restarts the systemshutdown -h– Scheduled halt/poweroffshutdown -r– Scheduled reboot
After Shutdown
When you power back on:
- VyOS will boot with your saved configuration
- All interfaces will come back up automatically
- DHCP server will start serving addresses
- NAT and firewall rules will be active
That’s it! Simple as sudo poweroff 🔌
Be First to Comment