Shutting Down, Restarting, Suspending, and Hibernating the Operating System
systemctl Command
The systemd uses the systemctl command instead of old Linux system management commands to shut down, restart, suspend, and hibernate the operating system. Although old Linux system management commands are still available in systemd for compatibility reasons, but it is advised that you use systemctl when possible.
Old Command |
systemctl Command |
Description |
---|---|---|
halt |
systemctl halt |
Shuts down the operating system. |
poweroff |
systemctl poweroff |
Powers off the operating system. |
reboot |
systemctl reboot |
Reboots the operating system. |
pm-suspend |
systemctl suspend |
Suspends the operating system. |
pm-hibernate |
systemctl hibernate |
Hibernates the operating system. |
pm-suspend-hybrid |
systemctl hybrid-sleep |
Hibernates and suspends the operating system. |
Shutting Down the Operating System
To shut down the system and power off the operating system, run the following command as the root user:
systemctl poweroff
To shut down the operating system without powering it off, run the following command as the root user:
systemctl halt
By default, running either of these commands causes systemd to send an informative message to all login users. To prevent systemd from sending this message, run the selected command with the --no-wall option:
systemctl --no-wall poweroff
Restarting the Operating System
To restart the operating system, run the following command as the root user:
systemctl reboot
Running this command causes systemd to send an informative message to all login users. To prevent systemd from sending this message, run this command with the --no-wall option:
systemctl --no-wall reboot
Suspending the Operating System
To suspend the operating system, run the following command as the root user:
systemctl suspend
Hibernating the Operating System
To hibernate the operating system, run the following command as the root user:
systemctl hibernate
To suspend and hibernate the operating system, run the following command as the root user:
systemctl hybrid-sleep