Hi Guys, In this guide, we will illustrate the difference between shutdown, poweroff, halt 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.
- 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
(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
- Shutdown the system with halt.
- Reboot the system with halt command.
(3): Power off Command
poweroff command sends an ACPI signal to tell the machine to power off.
- Poweroff the system.
- halt the system with poweroff command.
- Reboot the system with poweroff command.
(4): Reboot Command
- Restart the system.
- halt the system with reboot command
- poweroff the system with reboot command.
We showed you how to use the shutdown, reboot, halt and poweroff commands to manage the poweroff and reboot Linux systems in many cases.