Operations 3 min read

Master Linux’s halt Command: Options, Syntax, and Practical Examples

The article explains how the Linux halt command shuts down a running system, details its syntax and run‑level behavior, lists all available options with meanings, and provides concrete examples demonstrating usage such as powering off with -p or shutting down without logging to /var/log/wtmp.

Open Source Linux
Open Source Linux
Open Source Linux
Master Linux’s halt Command: Options, Syntax, and Practical Examples

halt: Shut Down the System

Function Description

The halt command is used to shut down a running Linux operating system; on production servers it should be used with caution.

halt first checks the system runlevel; if the runlevel is 0 or 6 it shuts down directly, otherwise it invokes shutdown.

Command Syntax

halt [options]

Option Meanings

-w : Writes only a shutdown record to /var/log/wtmp without actually rebooting or powering off.

-n : Does not sync disks before shutting down.

-d : Shuts down without writing a record to /var/log/wtmp.

-f : Forces shutdown regardless of the current runlevel, bypassing shutdown.

-i : Turns off all network interfaces before shutting down.

-p : Calls poweroff (default) to turn off the power.

--verbose : Prints more detailed messages during reboot, useful for debugging shutdown issues.

Reference Examples

Example 1: Use the -p option to power off the system, equivalent to the poweroff command. [root@linuxcool ~]# halt -p Example 2: Shut down the system without leaving a record.

[root@linuxcool ~]# halt -d
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Linuxcommand optionshalt commandsystem shutdownUnix administration
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.