restart ubuntu

The process of restarting Ubuntu desktops is similar to most other platforms; you can open the Shutdown menu and select the Restart option from there.

Ubuntu servers, on the other hand, usually don’t have a desktop environment. On such machines, you can use the CLI methods covered here to restart the system. 

Restart Ubuntu Graphically

If you’re new to Ubuntu, the easiest way to restart will be to click on the Power button from the notifications area and select the Restart option. 

Restart Menu in KDE Plasma and GNOME

This process may slightly vary depending on the desktop environment in use. For instance, KDE Plasma desktops have an interface similar to Windows. This means you can press the Super key, or click on the Applications icon from the bottom-left to access the Restart option.

Use Shutdown Command

The shutdown command schedules a time when the system can be brought down safely. It works by requesting the init daemon to change the runlevel to the specified value. For instance, specifying the reboot flag means runlevel 6 will be used to reboot the system. 

sudo shutdown -r

This will schedule the reboot for a minute from the current system time. If you want to reboot immediately, you can specify the time as now.

sudo shutdown -r now

You can schedule a restart 30 minutes from now like so

sudo shutdown -r +30

Or, you can schedule the reboot at a specific time in an Hour:Minute format like so

sudo shutdown -r 16:40

Finally, if you need to cancel a scheduled restart, you can use

shutdown -c

Use Reboot Command

The reboot command is an alternative way to restart Ubuntu. When run with the force option, it invokes the reboot system call and immediately restarts the system.

sudo reboot -f

Alternatively, you can run it without any options. This’ll cause it to invoke the shutdown command instead, which ultimately causes the system to restart as well.

reboot

Restart systemd

On Linux distros that use the systemd system and service manager (such as Ubuntu), you can restart the system like so 

sudo systemctl reboot

One advantage of this method is that you can directly boot to your firmware options page if you want.

sudo systemctl reboot --firmware-setup

Change Runlevel with telinit

init defines the system operation mode through runlevels, but init itself doesn’t keep track of runlevels. Instead, runlevels are managed through userspace tools such as shutdown or telinit. As mentioned earlier, runlevel 6 instructs init to kill child processes and reboot the system.

telinit 6

How to Restart Ubuntu WSL?

If you’re running Ubuntu through Windows Subsystem for Linux (WSL), the usual restarting methods like the reboot or shutdown commands may not work. 

This happens because restarting the Ubuntu container requires different steps compared to restarting a physical or virtual machine.

In the case of WSL1, you can open an elevated PowerShell window and restart the LXSS Manager Service to restart your WSL distributions.

Restart-Service LxssManager

With WSL2, you can terminate and reboot the distro like so

wsl -t DistroName
wsl -d DistroName

Systemd support has been introduced in the most recent WSL releases in Windows 11, so simply restarting systemd as demonstrated earlier should work as well.

Anup Thapa

Senior Writer

Anup Thapa is a Linux enthusiast with an extensive background in computer hardware and networking. His goal is to effectively communicate technical concepts in a simplified form understandable by new Linux users. To this end, he mainly writes beginner-friendly tutorials and troubleshooting guides. Outside of work, he enjoys reading up on a range of topics, traveling, working out, and MOBAs.