Pages

Friday, June 2, 2017

Understanding Shutdown, Poweroff, Halt and Reboot Commands in Linux

In this article, we will explain to you the difference between shutdownpoweroffhalt 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.

      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                                    ► Read more: http://adf.ly/1n5ZOm
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

No comments:

Post a Comment