Restarting your system through the graphical interface is simple—but what if you're running a headless Ubuntu server or prefer using the command line? Whether you're on Ubuntu Desktop or Ubuntu Server, understanding how to restart Ubuntu from terminal is essential for developers, sysadmins, or anyone working with Linux remotely.

In this comprehensive guide, we'll cover everything you need to know about rebooting Ubuntu from the terminal, including different command options, use cases, and troubleshooting tips. You’ll also learn how to restart Ubuntu server from terminal, how to reboot using command line tools, and more.

 

Why Restarting Ubuntu from the Terminal Matters

Many Ubuntu users—especially those managing servers—don't have a graphical interface. In such cases, knowing how to restart Ubuntu from terminal is a must. You may need to restart:

  • After installing updates

  • When applying configuration changes

  • After restarting network services

  • When troubleshooting

The terminal gives you full control over the reboot process, ensuring your system restarts cleanly and securely.

 

How to Restart Ubuntu from Terminal (Basic Command)

The most straightforward method for how to restart Ubuntu From terminal is to use the reboot command:

sudo reboot

This command immediately initiates a system reboot. The use of sudo is necessary because restarting the system requires administrative privileges.

Alternative:

sudo shutdown -r now

This command also reboots the system but adds more flexibility, allowing you to set a delay or send a message to users. Both methods are perfect if you're wondering how to restart Ubuntu by terminal.

 

Restarting Ubuntu Server from Terminal

If you're working on a remote server (often without GUI), you'll likely SSH into your machine and want to know how to restart Ubuntu server from terminal.

Steps:

  1. SSH into the server:

ssh user@your-server-ip

  1. Use the reboot command:

sudo reboot

You can also use:

sudo systemctl reboot

This command works similarly but uses systemd under the hood, the modern init system used by Ubuntu.

🔗 Want to reboot Linux systems more generally? Check out our guide on How to reboot Linux

 

Restarting Ubuntu 20.04 from Terminal

Wondering how to restart Ubuntu 20.04 from terminal specifically? The reboot process hasn’t changed much between versions, so everything we've covered so far applies to Ubuntu 20.04.

For example:

sudo reboot

or

sudo shutdown -r now

are perfectly valid.

However, if you’re running a newer version like Ubuntu 22.04 or managing services with systemd, you can also use:

sudo systemctl reboot

This method ensures compatibility with systemd-managed processes.

 


 

How to Restart Ubuntu Using Terminal (with Delay or Message)

Need to notify users before rebooting or schedule a reboot? Use the shutdown command with additional arguments:

sudo shutdown -r +10 "System will reboot in 10 minutes"

This will restart the system after 10 minutes and display the message to all logged-in users.

To cancel a scheduled shutdown or restart:

sudo shutdown -c

 


 

Restart Ubuntu From Command Line: Best Practices

Knowing how to restart Ubuntu from command line is helpful, but you should also follow best practices:

  • Always save your work before restarting

  • Inform connected users before rebooting (on shared systems)

  • Restart during low-traffic periods for servers

  • Monitor logs after reboot for error detection (journalctl -xb)

 

How to Restart Terminal Linux

If you're looking to restart the terminal session itself (not the entire system), you can simply close and reopen the terminal window or use the following command to reinitialize the shell:

exec bash

This replaces the current shell with a new instance. It’s helpful when testing environment variable changes.

 

Restart Ubuntu Desktop from Terminal

If your GUI is unresponsive or you just prefer the command line, here’s how to restart Ubuntu desktop:

sudo systemctl restart gdm

If you’re using a different desktop environment:

  • For KDE: sudo systemctl restart sddm

  • For LightDM (common on older Ubuntu): sudo systemctl restart lightdm

These commands restart the display manager without rebooting the entire system.

 

How to Restart Ubuntu From Terminal Mac

If you're remotely managing an Ubuntu server from a Mac, you’d typically use SSH from the macOS Terminal:

ssh user@server-ip

Once logged in, use:

sudo reboot

The same principles of how to restart Ubuntu using terminal apply—only your client (macOS) differs.

 


 

Ubuntu Shutdown Command Timer

Need to reboot or shut down the system at a specific time?

Example:

sudo shutdown -r 02:30

This schedules a reboot at 2:30 AM.

Learn more with our guide: Linux Shutdown Command

 

How to Restore Ubuntu from Backup

Restarting isn’t always enough. If your system is broken, you may want to restore Ubuntu from backup. You can do this with:

  • Timeshift (for snapshots)

  • Clonezilla (for full disk images)

  • Deja Dup (Ubuntu’s built-in backup tool)

These tools help you roll back to a stable state. Just remember to always back up before critical changes.

 

How to Reset Ubuntu from BIOS

Resetting Ubuntu from BIOS directly isn't possible, but you can boot into recovery mode or from a live USB to reset or reinstall Ubuntu. From BIOS:

  1. Set your boot device to USB/DVD

  2. Use a live Ubuntu ISO to reinstall the OS or fix boot issues

 

Bonus: Need to Restart Apache Instead?

If your goal is to restart Apache services in Ubuntu or another Linux distro, check out our article on How to restart Apache in Linux, CentOS and Debian

 

 

Restart Ubuntu from Terminal: Summary of Commands

Task

Command

Immediate restart

sudo reboot

Restart with shutdown command

sudo shutdown -r now

Scheduled restart

sudo shutdown -r +10

Restart display manager

sudo systemctl restart gdm

Restart server via SSH

ssh user@ip + sudo reboot

Restart shell only

exec bash

 

Conclusion: Restart Ubuntu with Ease and Efficiency

Restarting Ubuntu from the terminal is a fundamental task that every Linux user should master—whether you're managing a personal desktop or a remote server. With the various methods we've covered—from the simple reboot and shutdown commands to server-specific approaches and command line alternatives—you can now confidently reboot your Ubuntu system in any scenario. Whether you’re running Ubuntu 20.04, managing a Linux VPS, or trying to reset the terminal itself, using the terminal gives you full control and flexibility.

Want reliable performance and fast reboots? Check out our Linux VPS Hosting plans designed for speed, security, and simplicity.