halt or fasthalt Command

Purpose

Stops the processor.

Syntax

{ halt | fasthalt } [ -l ] [ -n ] [ -p ] [ -q ] [ -y ]

Description

The halt command writes data to the disk and then stops the processor. The machine does not restart. Only a root user should run this command. Do not use this command if other users are logged into the system. If no other users are logged in, the halt command can be used. Use the halt command if you are not going to restart the machine immediately. When the message ....Halt completed.... is displayed, you can turn the power Off.

The halt command logs the shutdown using the syslogd command and places a record of the shutdown in /var/adm/wtmp, the login accounting file. The system also writes an entry into the error log which states that the system was shut down.

The fasthalt command stops the system by calling the halt command. The fasthalt command provides BSD compatibility.

Flags

Item Description
-l Does not log the halt in the accounting file. The -l flag does not suppress accounting file update. The -n and -q flags imply the -l flag.
-n Prevents the sync before stopping.
Item Description
-p Halts the system without a power down.
Note: The -p flag will have no effect if used in combination with flags not requiring a permanent halt. Power® will still be turned off if other operands request a delayed poweron and reboot
-q Causes a quick halt.
Note: Running halt command with -q flag does not issue sync, so the system will halt immediately.
-y Halts the system from a dial-up operation.

Security

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in AIX® Version 7.1 Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To halt the system without logging the halt in the accounting file, enter:
    halt -l 
  2. To halt the system quickly, enter:
    halt -q
  3. To halt the system from a dial-up, enter:
    halt -y

Files

Item Description
/etc/rc Specifies the system startup script.
/var/adm/wtmp Specifies the login accounting file.