Skip to main content
Managing a Linux system’s power state correctly ensures data integrity and gives users time to save work before the machine goes offline. In this guide, you’ll learn how to:
  • 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, and systemctl 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)

For more options, refer to the official systemctl documentation.

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

The shutdown utility lets you schedule a shutdown or reboot and broadcast a warning message to all users.

Schedule by Clock Time

(Times use 24-hour format, e.g., 00002359.)

Schedule by Delay

(The system will shut down in 15 minutes.)

Reboot with shutdown


4. Notifying Logged-In Users

To give users advance notice, append a quoted message at the end of the shutdown command:
This message appears on all connected terminals, allowing users to save work before the system goes down.

References and Further Reading

Watch Video