CentOS

How to Shutdown CentOS 8

Shutdown CentOS 8

Introduction:

Unlike other devices, you should not shutdown your computer systems by pressing the same power button you used to turn it on. By doing this, you might end up losing your data and corrupting the system. It is necessary to properly and safely shutdown the system as it closes all the programs and safely exits the OS, ensuring the system does not get corrupted.

In this post, we will be showing you some ways to shutdown the CentOS system. You can shutdown the system using either of the following methods:

  • Through command line
  • Through GUI (Graphical User Interface)

Note: The commands and procedures discussed here have been tested on the latest CentOS release i.e. CentOS 8.

Methods of Shutting Down CentOS

Through Command Line

Here, we will share some of the command line ways to shutdown a CentOS system:

Method # 1: Using the “shutdown” Command:

The CentOS system can be shutdown using the “shutdown” command. It can be used in various ways which have discussed here:

Shutdown the system immediately

To shutdown the system immediately, issue any of the following commands in Terminal:

$ shutdown -p now

or

$ shutdown -p 0

The system will start the shutdown process right after running any of the above commands.

Shutdown after m minutes

You can also schedule the shutdown process by specifying the time in minutes. For instance, to shutdown the system after 10 minutes, the command would be:

$ sudo shutdown -p +10

centos shutdown command

Send a message before the shutdown

You can also send a notification message to all logged-in users before shutting down the system. For instance, the following command will shutdown the system after 10 minutes along with sending the message to users,

$ sudo shutdown –p +10 "System is going to shutdown in 10 minutes"

centos shutdown command

Cancel shutdown

To cancel a scheduled shutdown, issue the following command:

$ sudo shutdown -c

Method # 2: Using the “halt” Command:

Another command to shutdown the CentOS system is the “halt” command. Use the “halt” command with -p option to shutdown the system:

$ halt -p

Method # 3: Using the “poweroff” Command:

With the “poweroff” command, you can also shutdown the system. Issue the following command in Terminal to shutdown the CentOS system:

$ poweroff

Method # 4: Using the “telinit” Command:

The telinit command in Linux can also be used to shutdown the CentOS system. Simply type telinit followed by 0 to shutdown the system.

$ telinit 0

Through GUI

Here, we will share some of the GUI ways to shutdown a CentOS system:

Method # 1: Using the Power Off Button:

In your CentOS desktop, go to the top right corner of the menu bar and click the drop-down icon as shown in the below screenshot.

By doing so, the system menu will show up on your desktop. Then in order to shut down your system, click the power icon as shown in the below screenshot.

You will see the below prompt informing you that your system is going to shutdown in 1 minute. In the meanwhile, you have the following options:

  • Click the Power Off button to immediately shutdown the system.
  • Click the Cancel button to stop the shutdown process.
  • Click the Restart button to restart the system instead of shutting down.

If you do not click any option, the system will automatically shutdown after 1 minute.

Method # 2: Using the Power Off Utility:

Hit the super key on your keyboard which will open the search bar. Type poweroff in the search bar and press Enter. When the search result appears, click the Power Off utility.

You will see the below prompt informing you that your system is going to shutdown in 1 minute. In the meanwhile, you have the following options:

  • Click the Power Off button to immediately shutdown the system.
  • Click the Cancel button to stop the shutdown process.
  • Click the Restart button to restart the system instead of shutting down.

If you do not click any option, the system will automatically shut down after 1 minute.

As with Linux, there are more than one ways to achieve the same job. The same is true with shutting down the Linux system. Using either of the above-discussed command line or GUI way, you can easily shutdown your CentOS system.

If you would like to shutdown Linux Mint 20, click here.

If you would like to shutdown Ubuntu 20.04 LTS, click here.

If you would like to shutdown Debian 10, click here.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *