Working with Ubuntu, you might have noticed that there is not one, but several ways to achieve a task so that users can select one based on their preference. Shutting down your system is also one such process that can be done in several ways; this includes using the command line or the Ubuntu graphical user interface.
In this article, we will describe three ways that a user can use to shut down or power off his/her Ubuntu system:
- Using the UI
- Through the application launcher search bar
- Through the Ubuntu command line, the Terminal
We have run the commands and procedures mentioned in this article on a Ubuntu 18.04 LTS system.
Method 1: Power Off using the UI
One of the simple ways to shut down your Ubuntu system is to use the menu accessible through the downward arrow located at the top right corner of your Ubuntu screen. This is the menu you will see when you click this arrow:
Click on the Power Off button located in the bottom right corner of this drop-down menu. The following dialog will display when you do so:
Through this dialog, you can do the following things:
- Cancel the power off process
- Restart your system
- Power Off the system
If you do not press any of the buttons, the system will automatically shut down after 60 seconds. The dialog even shows a countdown, by the delay of 10 seconds, after which your system will be powered off.
Method 2: Power Off Using the Application Launcher Search
Another quick method to shut down your system is to use the very useful, application launcher search bar. This bar can be accessed by hitting the Super/Windows key on your keyboard.
Enter the keywords “power off” in this search bar and you will see the Power Off utility in the search result as follows:
Click on the Power Off search result and you will be presented the same Power Off dialog, through which you can power off your system, restart it, or even cancel the shut down process altogether.
Method 3: Power Off Using the Terminal
For a Terminal-savvy person, the Ubuntu command line also provides a way to shut down your Ubuntu system.
Open the Ubuntu command line, the Terminal, either through the application launcher search or the Ctrl+Alt+T shortcut.
Then enter the following command in order to power off the system:
As you can see in the above output, the shutdown command when used as described above will not power off the system right away. It will give the user some time, usually 1 minute, to save the important things they are working on.
There is, however, a way to shutdown the system without any delay and prompt. This command requires sudo privileges as such an abrupt shutdown may harm the system. Here is the command that you can use:
$ sudo shutdown -P now
The shutdown command also lets you schedule powering off your system. You can do this by the following command:
$ shutdown +t
Where t is the time, in minutes, after which your system will be automatically powered off.
$ shutdown +5
If you want to cancel this scheduled shutdown, run the following command in your Terminal:
$ shutdown -c
So, these were 3 ways to shut down your Ubuntu system. Unfortunately, there is no default keyboard shortcut for shutting down Ubuntu. We will explain a way to create a custom shortcut for this purpose in another article.