halt Command: Tutorial & Examples
Shut down the system
The halt
command is used to shut down the system. This command can be executed by a user with root or superuser privileges. It sends an instruction to the Linux kernel to stop
all processes and services, and then power off the system. This command is similar to the "power off" button on a physical machine. The halt
command can also be used with options
such as -f
(force) and -p
(power off) to force a halt or power off the system, respectively. If you want to halt the system without logging out, you can use
the shutdown -h now
command.