System and processes
The halt command
Stops the system without necessarily cutting the power. It is the classic way to stop the machine.
Most useful options
--helpShows a short help text and exits, without stopping anything.-p, --poweroffPowers the machine off when the command is halt, instead of only halting it.-w, --wtmp-onlyOnly writes the shutdown entry to wtmp. It neither halts nor powers off anything.-d, --no-wtmpDoes not write the shutdown entry to wtmp.-n, --no-syncDoes not sync the disks before stopping the system. Data still in memory can be lost.--no-wallDoes not send the warning to users before the action.-f, --forceStops immediately without going through the init system. File systems may not be unmounted properly.Copy-ready examples
$ halt --helpa short help text with the available options. It is the safe example to start with.$ sudo halt -wrecords a shutdown in wtmp without stopping anything. Warning: that false entry stays in the history shown by last.$ sudo haltstops the system. Warning: it cuts the work of every open session; use it only if you are sure.$ sudo halt -ppowers the machine off completely. Warning: it is equivalent to poweroff and also cuts every session.You can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- According to the systemd manual, halt stops the system and leaves the power on; to fully power off you need poweroff or halt -p.
- On older systems halt and poweroff did the same thing. The manual notes this as SysV-era behavior.
- With -f or -n, data still in memory may not reach the disk. Avoid them unless you have a specific reason.
Differences from similar commands
FAQ
Why is the machine still on after halt?
Because halt stops the system but does not cut the power. To power it off completely use poweroff or halt -p.
What does halt -w do?
It only writes a shutdown entry to wtmp, the session log. It stops nothing, but that entry shows up in last as if the machine had shut down.
What is --no-wall for?
It skips the warning to users before the action. Use it only when nobody depends on that warning.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course