the difference between shutdown, poweroff, halt and reboot
2017-07-18 15:25
288 查看
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:
To cancel a pending shutdown, simply type the command below:
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:
Power off Command
poweroff sends an ACPI signal which instructs the system to power down.
The following are examples of poweroff commands:
Reboot Command
reboot instructs the system to restart.
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 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.
相关文章推荐
- JMeter daily notes --- the difference between "stop" and "shutdown" command
- What is the difference between getWidth/heigth() and getMeasuredWidth/Heigth() in Android SDK?
- What is the difference between Binding and TemplateBinding?
- The difference between Process and Procedure
- linux命令,关机、重启(shutdown,reboot,halt,poweroff)
- What are the differences between maximum likelihood and minimize cross entropy loss function?
- whats is the difference between train, validation and test set, in neural networks?
- Multi-thread: What is the difference between OpenMP and MPI
- The difference between migration and upgrade
- test the difference between "DEFAULT NULL" and "DEFAULT 0"
- What is the difference between a URI, a URL and a URN
- What the difference between __weak and __block reference?
- What is the basic difference between NSTimer, NSTask, NSThread and NSRunloop?
- In PHP5, what is the difference between using self and $this? When is each appropriate?
- what is the difference between ELF files and bin files
- The difference between EXISTS and IN upon Oracle
- the difference between imperative style and functional style
- The difference between lint and gcc
- The difference of overriding between C# and Java
- What is the difference between g++ and gcc?