Along with many other routine tasks, Linux administrators also have to perform a safe shutdown or reboot. It seems the simplest task but should be done in a secure way. Our systems are continuously running processes. If the system is not properly powered off, files and processes will not safe closely, might result in corrupted files, and can leave your system in an unstable state. It is therefore advised to properly and securely power off the system.

Similar to other operating systems, Linux also offers several ways of powering off your system using different ways. In this article, we will those ways that you can use to power off your Linux OS:

  1. Using the UI
  2. Through the application launcher search bar
  3. Through the Ubuntu command line, the Terminal

We have used Debian10 OS for describing the procedure mentioned in this article.

Method 1: Using the Debian GNOME UI

One of the easiest methods to shut down your Debian system is to use the menu available at the top right corner of your desktop. A menu will appear, click on the power off button in the bottom right corner of the drop-down menu.

By doing so, the following dialog box will appear. You can choose to cancel, restart or power off your system. The system will automatically power off after 60 seconds if you don’t click any of the options.

Method 2: Power off Debian using the application launcher search bar

Another way to power off the system is through the Application launcher search bar. To do so, hit the super key on your keyboard. In the search bar, type keyword power off. Click the power off utility from the results.

From the dialog box that appears, you can choose to cancel, restart or power off your system as shown below. The system will automatically power off after 60 seconds if you don’t click any of the options.

Method 3: Shutdown Debian using the command line (Terminal)

The third method that can be used to power off the system is through the Terminal which can be used to perform any kind of task.

We will discuss here some commands that can be used to power off the system.

1. Debian Shutdown command

Enter the below command to power off the system using shutdown command:

$ sudo shutdown

It will not shut down the system immediately. Instead, it takes approx. 1 min before powering off your system. So during this time if you plan to cancel the shutdown process, you can type shutdown –c.

To power off the system immediately, use shutdown command with –p option as follows:

$ sudo shutdown –p now

You can also schedule the power-off process. For instance, to power off the system after a specified time e.g. 3 minutes, use the following command:

$ sudo shutdown +3

2. Debian Poweroff command

The poweroff command can be used to power off the system by sending an ACPI signal to instruct the system to disconnect the main power.

Enter the below command to power off the system using poweroff command:

$ sudo poweroff

3. Debian halt command

Halt command instructs the hardware to terminate all processes and shutdown CPU while leaving it powered on. If the halt command is combined with –p option, it can be used to power off the system too. Enter the below command to power off the system using the halt command:

$ sudo halt -p

4. Debian reboot command

Reboot command if used with –p option can also be used to power off the system as follows:

$ sudo reboot –p

Now you have learned so many ways to power off the system. Using these methods, you can securely power off your system without disrupting files and OS.

3 Ways to Power off Debian
Avatar

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. He blogs at LinuxWays.