Understanding Shutdown, Poweroff, Halt and Reboot Commands in Linux

In this article, we will explain to you the difference between shutdown, poweroff, halt and reboot Linux commands. We will make clear what they actually do when you execute them with available options.

If you are hoping to dive into Linux server administration, then these are some of the important Linux commands you need to fully understand for effective and reliable server administration.

Normally, when you want to turn off or reboot your machine, you’ll run one of the commands below:

Shutdown Command

shutdown schedules a time for the system to be powered down. It may be used to halt, power-off or reboot the machine.

You may specify a time string (which is usually “now” or “hh:mm” for hour/minutes) as the first argument. Additionally, you may set a wall message to be sent to all logged-in users before the system goes down.

Important: If the time argument is used, 5 minutes before the system goes down the /run/nologin file is created to ensure that further logins will not be allowed.

Examples of shutdown commands:

# shutdown
# shutdown now
# shutdown 13:20  
# shutdown -p now	#poweroff the machine
# shutdown -H now	#halt the machine		
# shutdown -r09:35	#reboot the machine at 09:35am

To cancel a pending shutdown, simply type the command below:

# shutdown -c

Halt Command

halt instructs the hardware to stop all CPU functions, but leaves it powered on. You can use it to get the system to a state where you can perform low level maintenance.

Note that in some cases it completely shuts down the system. Below are examples of halt commands:

# halt		   #halt the machine
# halt -p	   #poweroff the machine
# halt --reboot    #reboot the machine

Power off Command

poweroff sends an ACPI signal which instructs the system to power down.

The following are examples of poweroff commands:

# poweroff   	       #poweroff the machine
# poweroff --halt      #halt the machine
# poweroff --reboot    #reboot the machine

Reboot Command

reboot instructs the system to restart.

# reboot            #reboot the machine
# reboot --halt     #halt the machine
# reboot -p   	    #poweroff the machine

That’s all! As mentioned earlier on, understanding these commands will enable to effectively and reliably manage Linux server in a multi-user environment. Do you have any additional ideas? Share them with us via the comments section below.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide
The Complete Linux System Administrator Bundle
Become an Ethical Hacker Bonus Bundle

You may also like...

12 Responses

  1. Ken says:

    Can I configure the amount of time the system is powered off during a reboot command? (Using Centos 7)

  2. JAGJR says:

    I would like to shutdown and poweroff machine. I have seen things like “/usr/sbin/shutdown -h +0 && /usr/sbin/poweroff” However, the poweroff command kills the machine prior to allowing programs to execute shutdown scripts.

    I do not wish to simply run poweroff, because it does not execute program shutdown scripts and simply halts all processes. Is there a way to get a graceful shutdown AND power down the machine?

  3. as3mbus says:

    is halt work like suspend ? and how to recover yourself from halt ?

  4. 4pr0p02 says:

    init 6 reboot
    init 0 shutdown

  5. wudanyang says:

    What is `halt` use scene? `shutdown` and `reboot` are enough.

  6. Mikechen says:

    Not tell the difference but only list those commands’ parameters

    • Aaron Kili says:


      There is really no difference, we explained this in their descriptions and with the example commands(they all work nearly in the same way, they may be used to perform related functionalities using particular options.)

  7. Tanmaya Meher says:

    So, basically “shutdown” command is all you need, safely speaking. :) I mean it does everything from halt, reboot, shutdown etc. that too whenever I want it to.

Leave a Reply to JAGJR Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.