Linux halt command

Linux 命令大全Linux Commands

If the system runlevel is 0 or 6, the Linux halt command shuts down the system; otherwise, it is replaced by the shutdown command (with the -h parameter).

Permissions: system administrator.

Syntax

halt [-n] [-w] [-d] [-f] [-i] [-p]

Parameter description:

  • -n: Do not sync memory data to the hard disk before shutdown.
  • -w: Does not actually shut down, only writes the record to the /var/log/wtmp file.
  • -d: Do not write the record to the /var/log/wtmp file (the -n parameter includes -d) -f: Force shutdown, without calling the shutdown command.
  • -i: Stop all network-related devices before shutdown.
  • -p: When shutting down, also perform the power off (poweroff) action.

Examples

Shut down the system

# halt

Shut down the system and power off

# halt -p

Shut down the system without leaving a record

# halt -d

Linux 命令大全Linux Commands

Other Extensions