- Reboot or power off immediately with
systemctl - Force a reset when the system is unresponsive
- Schedule shutdowns or reboots with
shutdown - Notify logged-in users in advance
1. Managing System States with systemctl
Most modern Linux distributions use systemd, andsystemctl is the primary tool to control power states.
All
systemctl commands require root privileges. Prepend sudo if you’re not running as root.Reboot
Power Off (Shutdown)
2. Forcing a Reboot or Shutdown
If your system is hung or won’t shut down cleanly, you can force the operation. Use these commands sparingly—they bypass the normal shutdown sequence and risk data loss.Forced shutdowns do not allow applications to close gracefully. Always try a standard reboot first.
3. Scheduling with shutdown
Theshutdown utility lets you schedule a shutdown or reboot and broadcast a warning message to all users.
Schedule by Clock Time
0000–2359.)
Schedule by Delay
Reboot with shutdown
4. Notifying Logged-In Users
To give users advance notice, append a quoted message at the end of theshutdown command: