Rebooting a Linux system is a fundamental administrative task, essential for applying updates, troubleshooting issues, or performing system maintenance. As a system administrator, you’ll often need to restart a server or desktop to ensure that new configurations, kernel updates, or hardware changes take effect.
Linux provides multiple ways to reboot, and each command comes with its own options and use cases. This guide covers the most commonly used Linux reboot commands, such as reboot, shutdown, and init, along with practical examples.
In this article, we’ll explore different Linux reboot commands with examples for both traditional SysVinit systems and modern systemd-based distributions.
What is Reboot in Linux?
In Linux, the reboot command is used to restart the operating system safely. Rebooting ensures that all services are stopped correctly, processes are terminated, and the system starts again without data corruption.
Typical scenarios when a reboot is required include:
- After installing software updates or security patches
- Following kernel upgrades
- When applying network or hardware changes
- For troubleshooting performance issues
By rebooting, the system loads fresh configurations and applies pending changes effectively.
Common Linux Reboot Commands
To reboot a Linux system, you must log in as the root user (or use sudo privileges). Open the terminal on your local machine or connect to a remote server using an SSH client and run any of the following commands to restart the system immediately:
1. Using the reboot Command
The simplest way to restart Linux is by using the reboot command.
reboot
Note:
- Requires root privileges or sudo rights.
- Restarts the system immediately without delay.
Alternatively, you can use the full path:
/sbin/reboot
OR
/sbin/shutdown -r now
2. Using the shutdown Command
The shutdown command is more flexible, allowing you to schedule a reboot.
Restart immediately:
sudo shutdown -r now
Restart after 5 minutes:
sudo shutdown -r +5
This broadcasts a message to all logged-in users, informing them that the system will reboot in 5 minutes.
Cancel a scheduled reboot:
sudo shutdown -c
3. Using the init Command
Older Linux systems (based on SysVinit) use the init command.
Reboot system:
sudo init 6
Shut down system:
sudo init 0
While still supported, most modern distributions prefer systemctl or reboot instead of init.
4. Using systemctl (for systemd-based distros)
Modern Linux distributions use systemd as the init system. For these, you can reboot with:
sudo systemctl reboot
This is equivalent to the reboot command but integrates better with systemd-managed services.
Commands to Reboot Remote Linux Servers
If you manage a server remotely, you can reboot it over SSH.
Log in as root and enter the command:
ssh root@your-server.com /sbin/reboot
Or using shutdown:
ssh root@your-server.com /sbin/shutdown -r now
To avoid sudo errors when running as a normal user, include -t:
ssh -t user@your-server.com sudo reboot
Sample outputs:
Connection to remote-server-com closed by remote host.
To understand whether the server is back online, use the ping command:
ping -a your-server.com
OR
ping -a server-ip-address
When the server responds to ping again, it means the reboot was successful, and the system is back online.
Commands to Reboot Server into BIOS/UEFI Firmware (systemd only)
On modern Linux distributions that use systemd, it’s possible to reboot the system directly into the firmware (BIOS/UEFI) setup interface. This feature is particularly useful for administrators managing servers, laptops, or desktops where accessing the BIOS manually can be inconvenient.
The command to achieve this is:
sudo systemctl reboot --firmware-setup
Note: This functionality may not be supported on all hardware. It has been tested successfully on popular brands such as Dell and HP servers and laptops.
Reboot and Shutdown Symlinks in systemd
In modern Linux systems, traditional commands like reboot and shutdown are actually symbolic links pointing to the systemctl command. You can verify this with:
ls -l $(which poweroff halt reboot shutdown)
Sample output:
lrwxrwxrwx 1 root root 28 Sept 22 02:40 /usr/sbin/halt -> /bin/systemctl
lrwxrwxrwx 1 root root 28 Sept 22 02:40 /usr/sbin/poweroff -> /bin/systemctl
lrwxrwxrwx 1 root root 28 Sept 22 02:40 /usr/sbin/reboot -> /bin/systemctl
lrwxrwxrwx 1 root root 28 Sept 22 02:40 /usr/sbin/shutdown -> /bin/systemctl
This means that when you run those commands, systemd handles the process in the background.
Checking Command Type
You can also use built-in commands to confirm how Linux interprets these executables:
type -a reboot
type -a poweroff
type -a halt
command -V shutdown
This helps you see whether they are binaries, symlinks, or shell built-ins.
Conclusion
Rebooting a Linux system is a routine but essential task for administrators and power users. Whether you’re applying updates, performing maintenance, or troubleshooting, knowing the correct Linux reboot command ensures a safe and controlled restart.
From simple commands like reboot and shutdown -r now to advanced options such as systemctl reboot --firmware-setup, Linux provides flexibility to manage both local and remote systems.
While legacy commands like init 6 are still supported, modern distributions rely on systemd, making systemctl the recommended approach. Always remember that only the root user or sudo-enabled accounts can perform a reboot.
By mastering these commands, you can confidently manage reboots on any Linux environment - whether on a personal workstation or a production server - ensuring reliability, uptime, and efficiency.
