Linux Reboot Command: 8 Ways to Restart Linux from the Terminal

Rebooting a Linux system might seem straightforward, but there are several ways to do it depending on your needs and the system’s condition. Whether you’re a new Linux user or an experienced sysadmin, knowing multiple Linux reboot commands can be useful, especially in troubleshooting or maintenance situations.

From standard commands to emergency alternatives, Linux offers flexible options that can ensure a smooth restart or provide a quick fix when your system becomes unresponsive.

In this post, we’ll walk you through eight easy methods to reboot a Linux system. We’ll cover everything from the most common commands, like reboot and shutdown, to more advanced techniques like using systemctl and init. Each method has its advantages and specific use cases, so by the end, you’ll know exactly which command to use in various scenarios to keep your system running smoothly.

Method 1 – The standard Linux Reboot Command

The reboot command is used in Linux systems to initiate a system reboot. It is a common way to restart the operating system. It’s worth noting that the reboot command requires root or superuser privileges, so you may need to add the sudo prefix to it and enter your password to execute it successfully.

The basic syntax of the reboot command is as follows:

sudo reboot

This will give a message like the image shown below:

Linux reboot command

Options

This command has various options that you can use to specify the behavior of the reboot. Here are some commonly used options:

  • --help : This option displays the help information for the reboot command by showing available options and their usage. Here is the information it gives:
Linux reboot command help option

As you see in the image, other options are:

  • --halt: halts the system instead of rebooting it. The machine stops, and on some hardware stays powered on.
  • -f or --force: This option forces an immediate reboot, performing a hard shutdown.
  • -p or --poweroff: This option shuts down the system and switches it off completely instead of rebooting.
  • -w or --wtmp-only: This option does not actually perform the reboot. It writes records to the /var/log/wtmp file.

Method 2 – sudo shutdown -r now

The shutdown command is used to shut down a Linux system. It provides a controlled shutdown process as it allows setting the shutdown time, display warning messages or cancel the shutdown. The point is the shutdown -r now command and the reboot command both serve the purpose of restarting a Linux system.

sudo shutdown -r now

The -r option specifies that the system will be rebooted, while the now option specifies the operation will be performed immediately. This is why two of these commands are alternatives to each other. Here is an example:

shutdown -r now

The shutdown command also accepts different options and parameters, for example, the command scheduling a shutdown at 10:40 PM (22:40):

sudo shutdown -r 22:40

Note that, these were a few examples to give insights to the shutdown command. It has various options to change the behaviour of the shutdown process.

Reboot vs shutdown vs halt vs poweroff

These commands look alike and do different things — and on a remote server, the difference between rebooting and powering off is the difference between waiting a minute and opening a support ticket.

CommandWhat it does
sudo rebootRestarts the system
sudo shutdown -r nowRestarts immediately — same result as reboot
sudo shutdown nowPowers off. It does not reboot
sudo poweroff or sudo shutdown -h nowPowers off
sudo haltStops the system; on some hardware it doesn’t cut the power
sudo shutdown -r +10Reboots in 10 minutes, warning logged-in users
sudo shutdown -cCancels a scheduled shutdown or reboot

About “reboot now”: the now is harmless but unnecessary — reboot has no delay to skip. now belongs to shutdown: without a time, shutdown waits one minute on systemd systems.

Reboot command by distribution

DistributionReboot commandNotes
Ubuntu, Debian, Linux Mintsudo reboot or sudo systemctl rebootsystemd
RHEL, CentOS, Rocky Linux, AlmaLinux, Fedorasudo reboot or sudo systemctl rebootsystemd; init 6 still works
Arch Linuxsudo rebootsystemd
Alpine Linuxreboot (as root)Uses OpenRC, not systemd — systemctl isn’t available
Raspberry Pi OSsudo rebootDebian-based
WSL on Windowswsl --shutdown in PowerShell, then reopenLinux reboot commands don’t restart WSL itself

Method 3 – Linux reboot command using systemctl

On modern Linux distributions that use systemd (most do today, like Ubuntu, Debian, CentOS, and Fedora), systemctl is the standard way to manage the system — including restarting it. This is the most “correct” method on current systems, as it lets systemd shut down services cleanly before rebooting.

sudo systemctl reboot

It does the same job as the reboot command, which on systemd-based systems is actually just a shortcut to this. Use it when you want the canonical, modern approach.

Method 4 – reboot Linux using init

The init command changes the system’s runlevel — a number that defines the system’s operating state. Runlevel 6 is reserved for rebooting, so init 6 triggers a restart.

sudo init 6

This is the traditional method from older, SysV-init systems. On modern systemd distributions it still works (it’s mapped to the systemd reboot target for compatibility), but systemctl reboot is preferred. Use init 6 mainly on older systems or out of habit.

Method 5 – Linux reboot using telinit

telinit is closely related to init — it tells the init process to switch to a given runlevel. Like init 6, using runlevel 6 triggers a reboot.

sudo telinit 6

The practical difference is subtle: telinit signals the already-running init process to change state, which is technically the more correct way to request a runlevel change. In everyday use, init 6 and telinit 6 produce the same result on most systems.

Method 6 – Using sysrq-trigger

This is a low-level hard reboot. It uses the kernel’s “magic SysRq” feature to restart the machine immediately, bypassing the normal shutdown sequence — it does not unmount filesystems cleanly or stop services gracefully.

echo b | sudo tee /proc/sysrq-trigger

A safer sequence, if the system still accepts commands: flush and protect the disks before the reboot.

echo s | sudo tee /proc/sysrq-trigger
echo u | sudo tee /proc/sysrq-trigger
echo b | sudo tee /proc/sysrq-trigger

s writes pending data to disk, u remounts filesystems read-only, and only then b reboots — the same idea as the classic REISUB sequence on a frozen keyboard.

Because it skips the clean shutdown, it carries a real risk of data loss or filesystem corruption. Reserve it for emergencies — for example, when the system is frozen and no standard command responds, as a last resort before pulling the power.

Warning: risk of data loss The methods below are hard reboots. They restart the system immediately, without stopping services or unmounting filesystems cleanly — which can cause data loss or filesystem corruption. Use them only in emergencies, when standard reboot commands no longer respond, and save your work first whenever possible.

Method 7 – Reboot a remote Linux server over SSH

On a server you reach over SSH, the reboot is one line:

ssh -t user@your-server 'sudo systemctl reboot'

The -t lets sudo ask for your password. Your session drops as soon as the server starts shutting down — that’s expected. Wait a minute, then check it’s back:

ping your-server

Once it answers, reconnect and confirm the reboot actually happened:

uptime -s
who -b

Both show when the system last booted.

⚠️ Before rebooting a production server, confirm your services start on boot — systemctl is-enabled nginx, for example. Otherwise the server comes back and the site doesn’t. And if it doesn’t come back at all, use your provider’s console or the power-cycle option in the control panel.

Method 8 – Forceful Linux reboot command

The -f (force) option tells reboot to restart the machine immediately, skipping the usual shutdown scripts and not stopping services gracefully

sudo reboot -f

On systemd, reboot -f still kills processes and unmounts or remounts filesystems read-only before restarting — it only skips stopping services properly. Doubling it, reboot -ff, skips even that and restarts instantly, like the SysRq method.

Like the SysRq method, this is not a clean reboot and can risk data loss, so it’s not for routine use. It’s helpful when a normal reboot hangs or doesn’t respond, but the system is still partially functional. As a rule: try the clean methods first, and only force a reboot when they fail.

Best practices

When rebooting a Linux system, there are several considerations to keep in mind to ensure a successful restart. Here are some important points to consider:

  • Save your work: Save any unsaved work and close any open applications or documents to avoid data loss or corruption.
  • Check whether a reboot is actually needed. On Ubuntu and Debian, the file /var/run/reboot-required exists when an update needs a restart. On RHEL-based systems, sudo dnf needs-restarting -r tells you.
  • Warn logged-in users on a shared server: sudo shutdown -r +5 "Rebooting for updates" gives them five minutes and a message.
  • Backup important data: If you have important data on the system, it’s always a good idea to have a backup before rebooting.
  • Check System After Rebooting: Rebooting may stop some services, make sure all system processes are still running after restart.

By following these practises, you can minimize the risk of data loss and have a successful reboot of your Linux system.

Frequently asked questions

How do I reboot Linux from the command line?

The simplest way is to run sudo reboot. On modern systemd-based distributions, sudo systemctl reboot does the same thing and is the recommended method, as it shuts down services cleanly before restarting.

What is the reboot command in Ubuntu?

The same as on any modern Linux: sudo reboot, or sudo systemctl reboot. Ubuntu, Debian and Linux Mint all use systemd, so both commands restart the system cleanly. sudo shutdown -r now works too, and lets you schedule the restart instead.

What is the difference between reboot and shutdown -r?

Both restart the system. reboot is the quick, direct command, while shutdown -r gives you more control — you can schedule the restart for a specific time and display a warning message to logged-in users. Use shutdown -r now for an immediate restart.

Does “shutdown now” reboot Linux?

No — it powers the system off. To restart, use sudo shutdown -r now or simply sudo reboot. It’s an easy mistake to make on a remote server, where powering off means you can’t reconnect until someone turns the machine back on.

Does the reboot command require sudo?

Yes. Rebooting requires root or superuser privileges, so you normally need to prefix the command with sudo and enter your password — unless you’re already logged in as the root user.

How do I schedule a reboot in Linux?

Use the shutdown command with a time. sudo shutdown -r 22:40 schedules a reboot for 10:40 PM, and sudo shutdown -r +10 reboots in ten minutes, warning logged-in users. To cancel a scheduled reboot, run sudo shutdown -c.

How do I force a reboot when Linux is frozen?

Try sudo reboot -f first — on systemd it skips the orderly service shutdown but still unmounts filesystems. If that hangs, sudo reboot -ff restarts instantly. As a last resort, the SysRq sequence s, u, b written to /proc/sysrq-trigger syncs the disks, remounts them read-only and reboots. The stronger the method, the higher the risk of data loss.

What does “Call to Reboot failed: Connection timed out” mean?

That systemctl couldn’t reach the system manager in time — usually because systemd or D-Bus is overloaded or hung. Try sudo systemctl reboot --force, which skips the orderly service shutdown. If that also hangs, sudo reboot -ff or the SysRq method restarts the machine without asking systemd at all.

How do I reboot a remote Linux server over SSH?

Run ssh -t user@your-server 'sudo systemctl reboot' — the -t lets sudo ask for your password. Your SSH session will disconnect as the server restarts; wait until it answers ping again, then reconnect and confirm with uptime -s. Before rebooting a production server, make sure its services are enabled to start on boot.

How do I check when Linux was last rebooted?

Run uptime -s for the exact boot time, or who -b for the same information in a different format. last reboot lists the history of previous reboots, as far back as the system’s login records go.

How do I restart WSL?

Linux reboot commands don’t restart WSL itself. Close your Linux terminals and run wsl --shutdown in Windows PowerShell or Command Prompt; the next time you open a WSL terminal, it starts fresh.

Need a Linux server you fully control? Reboot, configure, and manage your own environment with root access from the command line. Copahost’s Cloud and VPS plans run on Linux with full SSH access, NVMe storage, and our own data center.
Full root access Linux distros NVMe storage
View VPS & Cloud plans

Conclusion

For almost every situation, sudo reboot or sudo systemctl reboot is all you need — they shut services down cleanly and restart the system. Use shutdown -r when you want to schedule the restart or warn other users, and remember that shutdown now on its own powers the machine off.

The forceful methods — reboot -f, reboot -ff and SysRq — are for when the clean ones stop responding, and each step down that list trades safety for certainty. On a remote server, the reboot is the easy part: confirming the services came back with it is what actually matters.

Share the Post:
Picture of Gustavo Gallas

Gustavo Gallas

Graduated in Computing at PUC-Rio, Brazil. Specialized in IT, networking, systems administration and human and organizational development​. Also have brewing skills.