halt

Shut down the running Linux operating system

Supplementary instructions

halt command is used to shut down the running Linux operating system. The halt command will first detect the runlevel of the system. If the runlevel is 0 or 6, the system will be shut down. Otherwise, shutdown will be called to shut down the system.

grammar

halt (option)

Options

-d: Do not record in wtmp;
-f: Regardless of the current runlevel, the system will be forced to shut down without calling shutdown;
-i: Before halt, close all network interfaces;
-n: Before halting, there is no need to execute sync first;
-p: After halt, execute poweroff;
-w: Only log in wtmp without actually ending the system.

Example

halt -p # Turn off the power after shutting down the system.
halt -d # Shut down the system without leaving any records.