How to Restart/Reboot Ubuntu Using Terminal?

Both reboot and restart are used for the same purpose: to shut down and start the machine instantly. The reboot/restart functionality is exercised mostly when some changes are made in the configuration files, BIOS settings, or some new applications are installed. In Ubuntu, the restart operation can be carried out using commands through the terminal. The terminal-based operations are fast and efficient enough that saves time.

This blog will help readers understand different methods of restarting Ubuntu from the terminal.

The content list is as follows:

Let’s start with the first one:

Method 1: Using the shutdown Command

The shutdown command is used to shut down the machine, however, if “-r” option is used with the shutdown command then, it will restart Ubuntu as shown in the figure:

$ shutdown -r --now

In the above command, the “–now” option is used to reboot Ubuntu instantly. If any numeric is used, then it will reboot after the specified seconds. For example, if the machine is supposed to be restarted after 5 minutes, then run the command:

$ shutdown -r 5

To find more about the “shutdown” command, use the command:

$ shutdown --help

For more information on the shutdown command, click here to read our article.

Method 2: Using the reboot Command

This command by name shows that it is used to reboot the computer; run the command in the terminal:

$ reboot

The machine will be rebooted, and to explore the usage of other options of reboot command, run the command with –help option:

$ reboot --help

The usage of all options of reboot command is displayed.

Method 3: Using the systemctl command

Third method to restart the machine is by using the systemctl command, which is mostly used to manage the services. However, it can also be used to restart/reboot your system as shown below:

$ sudo systemctl restart

The machine will be restarted.

These are the possible methods to restart/reboot a Ubuntu using the terminal.


Ubuntu can be restarted/rebooted using the terminal by three commands the shutdown command, the reboot command, and the systemctl command. The reboot and systemctl commands restart/reboot the system instantly. However, the shutdown command can schedule a restart/reboot per the user’s requirement. This blog explains all these three commands in detail for Ubuntu 22.04.