Restarting Ubuntu is one of those simple tasks that becomes surprisingly important when you are managing updates, troubleshooting frozen services, switching kernels, or maintaining a remote server. Whether you prefer clicking through the graphical interface or typing a fast command in the terminal, Ubuntu gives you several safe and reliable ways to reboot your system.
TLDR: To restart Ubuntu from the terminal, use sudo reboot or sudo shutdown -r now. If you are using the desktop, open the system menu and choose Power Off / Log Out, then select Restart. For scheduled reboots, use sudo shutdown -r +10 to restart in 10 minutes. Always save your work before rebooting, especially after system updates or configuration changes.
Why Reboot Ubuntu?
Ubuntu is known for stability, and many Linux systems can run for weeks, months, or even years without restarting. Still, a reboot is sometimes the cleanest and safest way to apply changes. For example, when Ubuntu installs a new Linux kernel, the system usually needs to reboot before that kernel becomes active. The same may apply after graphics driver updates, core library upgrades, or low-level security patches.
A restart can also help when the desktop environment becomes unresponsive, network services fail to reload properly, or hardware devices are not detected after configuration changes. While Linux offers advanced ways to restart individual services, a full reboot resets the entire system state and often resolves problems quickly.
In short, rebooting is not just about turning the computer off and on again; it is a controlled process that safely stops running programs, unmounts storage, restarts system services, and brings Ubuntu back up cleanly.
The Main Ubuntu Reboot Command
The most common terminal command for restarting Ubuntu is:
sudo reboot
This command tells the system to reboot immediately. Because restarting affects the entire machine, Ubuntu usually requires administrator privileges, which is why sudo is used. After typing the command, you may be asked to enter your password. Once authenticated, Ubuntu begins the shutdown and restart sequence.
The reboot command is simple, memorable, and works on Ubuntu Desktop, Ubuntu Server, virtual machines, and most Ubuntu-based distributions. It is the command many users learn first because it does exactly what its name suggests.
Using the Shutdown Command to Restart Ubuntu
Another widely used method is the shutdown command. Although the name suggests powering off the computer, it can also restart the system when used with the -r option.
sudo shutdown -r now
Here is what each part means:
sudoruns the command with administrator privileges.shutdownstarts the system shutdown process.-rmeans restart after shutting down.nowmeans perform the action immediately.
The shutdown command is especially useful because it supports scheduling. For example, to restart Ubuntu in 10 minutes, use:
sudo shutdown -r +10
You can also schedule a restart for a specific time:
sudo shutdown -r 23:30
This command schedules a reboot at 11:30 PM. It is handy for servers, shared computers, or workstations where you want to give users time to save their work before the system restarts.
Canceling a Scheduled Reboot
If you scheduled a restart and then changed your mind, you can cancel it with:
sudo shutdown -c
The -c option cancels a pending shutdown or reboot. If users are logged into the system, it is good practice to send a message explaining that the restart has been canceled or delayed.
Adding a Reboot Message
When rebooting a system used by multiple people, you can include a message. For example:
sudo shutdown -r +15 "System will restart in 15 minutes for maintenance."
This warns logged-in users and gives them time to save files, close applications, or disconnect cleanly. On servers, clear restart messages can prevent confusion and reduce the risk of interrupted work.
Restarting Ubuntu with systemctl
Modern Ubuntu systems use systemd as the init system, which manages services, startup processes, and system states. Because of that, you can also reboot Ubuntu with:
sudo systemctl reboot
This command asks systemd to restart the machine. In many cases, sudo reboot and sudo systemctl reboot have the same practical effect. However, learning the systemctl version is useful because systemd also manages services, targets, logs, and power states.
For example, if you frequently administer Ubuntu servers, you will likely use systemctl to restart services such as Apache, Nginx, MySQL, or SSH. Using it to reboot the whole system fits naturally into that workflow.
Restarting Ubuntu from the GUI
If you are using Ubuntu Desktop, restarting from the graphical interface is straightforward. The exact appearance may vary slightly depending on your Ubuntu version, but the process is generally the same.
- Click the system status area in the top-right corner of the screen.
- Select Power Off / Log Out.
- Click Restart.
- Confirm the restart if prompted.
This method is ideal for everyday desktop users because it gives applications a chance to close properly. If documents are unsaved, programs such as LibreOffice, text editors, or browsers may prompt you before the restart completes.
For most home and office users, the GUI restart option is the safest and most familiar method. The terminal, however, is faster and more flexible, especially when the graphical interface is frozen or unavailable.
Rebooting When Ubuntu Is Frozen
Sometimes Ubuntu may become partly unresponsive. The mouse might move, but windows do not open. Or the desktop may freeze while the system underneath is still running. In such cases, try a few safe options before forcing a power-off.
First, open a terminal with:
Ctrl + Alt + T
If the terminal opens, run:
sudo reboot
If the desktop is frozen but the keyboard still works, switch to a virtual terminal by pressing:
Ctrl + Alt + F3
Log in with your username and password, then run the reboot command. To return to the graphical session, you can usually press Ctrl + Alt + F2 or Ctrl + Alt + F1, depending on your Ubuntu version.
If nothing responds, a forced power-off using the physical power button may be your last option. However, this should be avoided when possible because it can interrupt disk writes and potentially cause data loss.
Rebooting a Remote Ubuntu Server
Many Ubuntu systems run without a monitor, keyboard, or graphical desktop. If you manage an Ubuntu server over SSH, rebooting from the terminal is essential.
First, connect to the server:
ssh username@server_ip_address
Then restart it:
sudo reboot
After issuing the command, your SSH session will disconnect as the server shuts down. Wait a short time, then reconnect. Depending on the server, cloud provider, hardware, and installed services, rebooting may take anywhere from a few seconds to several minutes.
Before restarting a remote server, consider these best practices:
- Check active users: Run
whoorwto see who is logged in. - Review running processes: Use
toporhtopto look for important activity. - Confirm updates: If rebooting after updates, check whether a reboot is required.
- Plan for downtime: Restart during a maintenance window if the server hosts websites, databases, or applications.
How to Know If Ubuntu Needs a Reboot
Ubuntu often tells you when a restart is required. On Ubuntu Desktop, you may see a notification after installing updates. On Ubuntu Server, you might see a message after login that says:
* System restart required *
You can also check for the reboot-required file:
cat /var/run/reboot-required
If the file exists, Ubuntu may display a message indicating that a restart is needed. You can also list packages that triggered the requirement with:
cat /var/run/reboot-required.pkgs
This is useful for administrators who want to understand why the system is asking for a restart. Common causes include kernel updates, security upgrades, and changes to important system libraries.
Reboot Versus Power Off
Although rebooting and powering off both involve shutting down the operating system, they are not the same. A reboot stops Ubuntu and immediately starts it again. A power off stops Ubuntu and turns the machine off.
To power off Ubuntu from the terminal, you can use:
sudo poweroff
Or:
sudo shutdown now
Use reboot when you want the system to come back online automatically. Use power off when you are finished using the machine, replacing hardware, moving a device, or shutting down a server intentionally.
Common Ubuntu Reboot Commands
Here is a quick reference list of useful reboot commands:
- Restart immediately:
sudo reboot - Restart immediately with shutdown:
sudo shutdown -r now - Restart using systemd:
sudo systemctl reboot - Restart in 5 minutes:
sudo shutdown -r +5 - Restart at a specific time:
sudo shutdown -r 02:00 - Cancel scheduled restart:
sudo shutdown -c
Safety Tips Before Restarting Ubuntu
A reboot is usually safe, but it is still a system-wide action. Before restarting, especially on production machines, take a moment to check the system state.
- Save open files in editors, office applications, browsers, and terminals.
- Close important applications gracefully instead of relying on Ubuntu to stop them.
- Check downloads, backups, or file transfers that may be interrupted.
- Notify other users if the system is shared.
- Verify remote access before rebooting a server, especially if firewall or SSH settings changed.
One particularly important point for remote systems is SSH configuration. If you changed SSH settings and then reboot, a mistake could lock you out. Whenever possible, keep an existing SSH session open while testing a new one before restarting.
Troubleshooting Reboot Problems
If Ubuntu does not restart properly, the cause may be a stuck service, driver issue, hardware problem, or filesystem error. If the system hangs during shutdown, watch the screen for messages. They may reveal which service is taking too long to stop.
After the system comes back online, you can inspect logs with:
journalctl -b -1
This shows logs from the previous boot, which can help identify what happened before the restart. For current boot logs, use:
journalctl -b
On desktop systems, graphics drivers are a common source of restart or shutdown trouble. On servers, networking, storage mounts, and long-running services are more common suspects.
Final Thoughts
Ubuntu gives you several dependable ways to restart, from the simple sudo reboot command to scheduled restarts with shutdown and desktop-based restarts through the GUI. For most users, the choice depends on context: use the graphical menu for everyday desktop restarts, use the terminal for speed and control, and use scheduled commands when other users or services need warning.
The key is to reboot intentionally. Save your work, understand why the restart is needed, and choose the method that best fits your situation. Once you know these commands, restarting Ubuntu becomes not just easy, but also safer and more professional.
