This article introduces the syntax and details of the Linux shutdown command & mdash; halt. Shutdown is inevitable in Linux. There are two common commands for shutdown: halt and shutdown. Shutdown is more powerful than halt. we recommend that you use shutdown. Halt [Syntax] halt [options] [details] halt is used to shut down the computer. However, it writes the information to & ldquo;/var/log/wt
This article introduces the syntax and details of the Linux shutdown command-halt. Shutdown is inevitable in Linux. There are two common commands for shutdown: halt and shutdown. Shutdown is more powerful than halt and is recommended.Shutdown.
Halt
[Syntax]Halt [option]
[Details]Halt is used to shut down the computer. However, it will write the information to "/var/log/wtmp" before shutting down. The halt command is similar to the shutdown command.
[Option]
| Option |
Functions |
| -N |
Disable the computer by running the "sync" command |
| -W |
Write information in "/var/log/wtmp", but do not shut down |
| -D |
Disable the computer and do not write information in "/var/log/wtmp" |
| -F |
Force Shutdown |
| -I |
Shut down the network before shutting down |
| -P |
Turn off the computer and power off |
| -H |
Turn off the computer, but not power off |
For example:
(1) shutdown but not power off:
Enter:
halt
The above command halt is equivalent to halt-h.
(2) turn off the computer and turn off the power
halt -p