> ## Content Index
> Fetch the complete content index at: https://itsfoss.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Shutdown or Restart Ubuntu Using Linux Command Line
- URL: https://itsfoss.com/schedule-shutdown-ubuntu/
- Published: 2014-08-15T02:31:17.000Z
- Updated: 2023-07-12T12:57:44.000Z
- Description: This quick tutorial teaches you how to shut down Ubuntu or any other distributions from the Linux command line or GUI.
- Author: Abhishek Prakash
- Tags: Quick Tip, Ubuntu

There are two ways to shutdown Ubuntu Linux. Go to the upper right corner and click the dropdown menu. You’ll see the shutdown button here. 

You can also use the command for an immediate shutdown:

```
shutdown now
```

In this article, I’ll discuss both GUI and terminal way of shutting down an Ubuntu system.

- Shutdown Ubuntu graphically (for desktop users)
- Shutdown Ubuntu using command line (for both [Ubuntu desktop and server](https://itsfoss.com/ubuntu-server-vs-desktop/) users)

## 1\. Shutdown Ubuntu graphically

If you use [Ubuntu desktop](https://www.ubuntu.com/download/desktop?ref=itsfoss.com), you would have no problems in finding the shutdown and the restart option located in the top right corner. If you do, you can extend the next section to see what it looks like.

It may depend on the desktop environment but usually, you’ll see the option in the top right corner:

![Restart or shutdown Ubuntu Linux by clicking on the poweroff button on top right button](https://itsfoss.com/content/images/2023/05/click-poweroff-ubuntu.png)

Click on the top right panel to bring the settings menu

If you click on the **Power Off** button, it will give you the options: Cancel and Power Off. You can choose the one you want.

![Choose if you want to shutdown or cancel](https://itsfoss.com/content/images/2023/05/poweroff.png)

Shutdown Ubuntu Linux

This article is specifically focused on [Ubuntu server editions](https://www.ubuntu.com/server?ref=itsfoss.com). You are probably stuck in a terminal and wonder how to shut down or restart the system from the command line.

## 2\. Restart or Shutdown Ubuntu Linux in Terminal

There are multiple commands you can use to shutdown Linux from the terminal. I would recommend the `shutdown` command. It’s easy to remember and easy to use.

Let’s see how can you use this shutdown command for shutting down or restarting your system.

### Shutdown Ubuntu Linux immediately

If you use the `shutdown` command without any arguments, it will shut down your system in one minute. You can change the behavior and shutdown Ubuntu immediately using:

```
shutdown now
```

### Schedule a shutdown in Ubuntu Linux

You can schedule a shutdown in various ways.

For example, to schedule a shutdown at 03:30 PM, you can use the command in the following fashion:

```
sudo shutdown 15:30
```

You don’t always have to specify the absolute time. You can provide a relative time as well.

For example, to schedule a shutdown 20 minutes from now, you can use shutdown command like this:

```
sudo shutdown +20
```

### Restart Ubuntu Linux immediately

Restarting Ubuntu can also be done with the wonderful [shutdown command in Linux](https://linuxhandbook.com/linux-shutdown-command/?ref=itsfoss.com). You just have to use the `-r` option to specify that it’s a reboot request.

By default, if you just use `shutdown -r`, it will reboot your system after one minute.

You can immediately restart Ubuntu from terminal using the `now` option like this:

```
sudo shutdown -r now
```

### Schedule a restart in Ubuntu Linux

You can also schedule a restart in the same way you scheduled a shutdown.

To schedule a restart at 3:30 PM, you can use:

```
sudo shutdown -r 15:30
```

To schedule a restart 20 minutes from now, you can use:

```
sudo shutdown -r +20
```

### Cancel a scheduled shutdown or reboot

If you have scheduled a shutdown or a restart, and later you realized that you don’t need it, you can cancel it easily. You just have to use the `-c` option with shutdown command:

```
sudo shutdown -c
```

## More on shutdown and reboot

If you are interested, you can refer to some more example of the [shutdown command](https://linuxhandbook.com/linux-shutdown-command/?ref=itsfoss.com).

[Linux Shutdown Command: 5 Practical ExamplesThe shutdown command in Linux allows you to shut down, reboot or schedule a shutdown of your system. This article explains the most common and useful examples of the Linux shutdown command.![](https://linuxhandbook.com/content/images/size/w256h256/2021/08/Linux-Handbook-New-Logo.png)Linux HandbookAbhishek Prakash![](https://linuxhandbook.com/content/images/2020/06/linux-shutdown-command.jpeg)](https://linuxhandbook.com/linux-shutdown-command/?ref=itsfoss.com)

If you think that shutdown is taking longer than expected, here are some troubleshooting advice. 

[Shutdown Taking Too Long? Here’s How to Investigate and Fix Long Shutdown Time in LinuxYour Linux system is taking too long to shut down? Here are the steps you can take to find out what is causing the delayed shutdown and fix the issue. I hope you are a tad bit familiar with the sigterm and sigkill concept. When you shut down your Linux![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSAbhishek Prakash![](https://itsfoss.com/content/images/wordpress/2020/09/troubleshoot-long-shutdown-linux.gif)](https://itsfoss.com/long-shutdown-linux/)

I hope these quick tips help you to shut down and restart Ubuntu and other Linux distributions from the command line. Any questions or suggestions are always welcome.