How to perform various power management related tasks in a Linux system such as:-
- halt
- power-off
- shutdown
- reboot
- sleep (suspend)
- hibernate
- hibernate-sleep
Essential power management options:
Comparing
Halt, power-off,
Shutdown,
and Reboot:
Mode/State
|
What does it do?
|
What does it not do?
|
Halt
|
Terminate
all processes and services and shutdown CPU but leaves the system in a
powered-on state.
|
Does
not power-off the system.
|
Power-off
|
Turn
off all services and process then send an ACPI command to the motherboard and
then to the PSU to terminate the power supply of the system.
|
Does
not execute any command or script before turning off the system.
|
Shutdown
|
Execute
configured commands and scripts and then shuts down the system by following
the same process which the power-off mode uses.
|
Does
not keep the system in a powered-on state.
|
Reboot
|
First
shutdown the system by following the same process which the shutdown mode
uses then sends a reboot ACPI command to the motherboard and PSU to start the
system again.
|
Does
not keep the system in a powered-off state.
|
Key
Points, Need to Know:
- In modern Linux, the systemd utility is used to manage all services and processes of the system.
- In systemd, the halt, poweroff, and reboot commands have been replaced with the systemctl halt, systemctl poweroff, and systemctl reboot commands respectively.
- For compatibility reasons the halt, poweroff, and reboot commands still exist but they are linked with their newer versions.
- For example, if you run the halt command, the systemd will execute the systemctl halt command.
You can try these commands
•command
halts the system.
•#shutdown
-H now
•command
powers off the system.
•#shutdown
-P now
•command
shuts down the system.
•#shutdown
•command
reboots the system.
•#shutdown
-r now
•command
shuts down and powers off the system at 03:44 AM.
•#shutdown
-P 03:44
•command
halt the system after 10 minutes.
•#shutdown
-H 10
•command
reboots the system after 15 minutes.
•#shutdown
-r 15
Advanced Power
Management
options:
Thanks By Harihar Mishra
#################################################################################
No comments:
Post a Comment