Highlights
- Systemctl Standard: The modern way to manage power states is using
systemctl, which interacts with thesystemdinit system. - Graceful Shutdown: Always prefer standard commands like
shutdownorrebootto allow running services to stop correctly and prevent data corruption. - Force Options: Use
--forceonly when absolutely necessary, as it kills processes instantly without saving data. - Scheduling: You can schedule shutdowns or reboots for a specific time or after a delay using the
shutdowncommand (e.g.,shutdown +15). - Wall Messages: Inform logged-in users about pending maintenance by adding a custom message to your shutdown command.
When a computer or server needs to be turned off, the term used to describe that process is "shutdown". When a computer or server needs to be turned off and back on, the term used to describe that process is "reboot".
This blog will show how to shut down and reboot a Linux system safely. It covers how to force a shutdown or a restart, schedule reboots, and set wall messages.
Using systemctl to Reboot and Shutdown a Linux Machine
To reboot or shut down a Linux machine, we’ll often use the systemctl (system control) command.
Some commands require system administrator privileges. The root user has such privileges. So we can reboot a machine by simply typing systemctl reboot. Regular users cannot use commands that change the system’s state. But they can temporarily get root privileges if they add sudo in front of their commands. So a regular user needs to type sudo systemctl reboot instead.
All you need to remember is this: “If I am logged in as root, I don’t need sudo”. So you can skip writing the “sudo” word if you’re already logged in as root. This applies to all the examples in this blog.
How to Reboot a Linux System
Below is a command for initiating an immediate Linux system reboot:
sudo systemctl rebootThis is the standard linux reboot command for modern systems using systemd.
How to Shutdown a Linux System
Below is a command for initiating an immediate Linux system shutdown:
sudo systemctl poweroffThis effectively executes a poweroff linux operation, powering down the hardware safely.
Commands for force shutting and force restarting Linux
Sometimes, you might find yourself in situations where the system refuses to reboot or shut down normally. That might be because some program is misbehaving, stuck in some way, and does not want to close properly. In such situations, you can force close all such programs and reboot in a more abrupt way (not recommended to do unless absolutely necessary).
sudo systemctl reboot --forcesudo systemctl poweroff --forceIf not even this works, you can specify –force twice (only use as a last resort):
sudo systemctl reboot --force --forceThis is exactly like pressing the reset button. The system reboots instantly and programs have no chance to close properly or save their data.
systemctl poweroff --force --forceThis is exactly like unplugging a computer from its power source.
How to schedule a Reboot or Shutdown of a Linux System
You’ll often find that you need to reboot some servers in the middle of the night, say 2 or 3 AM. It’s inconvenient to have to wake up just to reboot some device, so you can instead instruct Linux to do this on its own.
The shutdown command is better suited for scheduled reboots or shutdowns.
The command for shutting down Linux at a specific time
To shutdown at 02:00 AM:
sudo shutdown 02:00The time is in a 24-hour format, so you can use anything between 00:00 and 23:59.
The command for shutting down Linux after specified minutes
If you want to shut down Linux after X minutes, use +X instead. For instance, to shutdown after 15 minutes, use this command:
sudo shutdown +15This is a classic usage of the linux shutdown command, which broadcasts a notification to all users.
The command for restarting Linux at a specified time
To schedule a reboot, add the -r reboot option. For instance, to reboot Linux at 2:00 AM, use this command:
sudo shutdown -r 02:00The command for restarting Linux after specified minutes
To schedule a reboot, add the -r option followed by the minutes to wait before the reboot. For instance, to reboot after 15 minutes, use the command below:
sudo shutdown -r +15The command for setting a wall message
You can also set what is called a wall message. If a few users are logged in to this Linux machine, the wall message will be shown to them before the server reboots or shuts down. This allows them to know in advance why and when the machine will become unavailable. It also gives them a chance to finish their work before this happens instead of abruptly being disconnected without knowing what happened.
You can write your wall message like this (between ‘ ‘ quotes):
sudo shutdown -r +1 'Scheduled restart to do an offline-backup of our database'Check out our Linux Basics Course & Labs

Conclusion
If you are not logged in as root, use the sudo before the shutdown or reboot command to ensure you have the necessary permissions to shut down the system. Also, save any unsaved work before shutting down to avoid data loss.
For those planning ahead, staying updated with Linux 2026 trends and best practices is essential for any system administrator.
More on Linux:
- How to List All Groups in Linux
- How to Count the Number of Files in a Directory in Linux
- How to Find Out When a File Was Created in Linux
- How to Create a Soft (Symbolic) Link in Linux
- How to Unzip Files to a Specific Directory in Linux
- How to Make a Bash Script File Executable in Linux
- How to Search Packages With Apt Search Command
Q1: What is the difference between reboot and systemctl reboot?
In modern systemd-based Linux distributions, reboot is often a symbolic link to systemctl. However, explicitly using the linux reboot command via systemctl ensures consistent behavior and better logging.
Q2: Does the Linux boot process change after a force reboot?
Forcefully rebooting (--force) skips the standard shutdown scripts. While the subsequent linux boot process remains the same (BIOS/UEFI -> Bootloader -> Kernel -> Init), the file system check (fsck) might run automatically to repair any inconsistencies caused by the abrupt shutdown.
Q3: Can I cancel a scheduled shutdown?
Yes. If you have scheduled a shutdown or reboot using shutdown +15, you can cancel it by running sudo shutdown -c.
Q4: Is there a difference between halt and poweroff?
Yes. halt stops the operating system but may not cut power to the hardware. poweroff linux commands stop the OS and send an ACPI signal to the motherboard to turn off the power.
Q5: Where can I find more Linux tutorials?
You can explore the KodeKloud blog or enroll in our Linux Learning Path to get hands-on experience with system administration, shell scripting, and more.

Discussion