3 Linux commands to shut down the system and you will able to do it easily

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Hi Guys, In this guide, we will illustrate the difference between shutdownpoweroffhalt and reboot command in Linux.

So let’s start:

(1): Shutdown Command

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

You can use now or you can use hh:mm for shutting down after hour/minutes.

Also you can set a message to send it to all logged in users before the system powered off.

Examples of shutdown command:

  • Just run the shutdown command to power off the system.
shutdown
OR
shutdown now
  • power off your system at 2:00 PM.
shutdown 14:00  
  • Poweroff the machine
shutdown -p now
  • Reboot the system at 16:45
shutdown -r 16:45
  • Also to cancel the pending shutdown, use the command with option -c
shutdown -c

(2): Halt Command

halt command is very smart, it tells the system Hardware to stop all CPU functions, but leaves it powered on. You can use it to get the system to a state when you want to do low level maintenance.

  • Halt the system
halt
  • Shutdown the system with halt.
halt -p
  • Reboot the system with halt command.
halt --reboot

(3): Power off Command

poweroff command sends an ACPI signal to tell the machine to power off.

  • Poweroff the system.
poweroff
  • halt the system with poweroff command.
poweroff --halt
  • Reboot the system with poweroff command.
poweroff --reboot

(4): Reboot Command

  • Restart the system.
reboot
  • halt the system with reboot command
reboot --halt
  • poweroff the system with reboot command.
reboot -p

Conclusion

That’s all!

We showed you how to use the shutdown, reboot, halt and poweroff commands to manage the poweroff and reboot Linux systems in many cases.

thanks

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
MQ-Jr
MQ-Jr
unixcop Admin

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook