halt or fasthalt Command
Purpose
Stops the processor.
Syntax
Description
The halt command
writes data to the disk and then stops the processor. The machine
does not restart. Only a root user can run this command. Do not use
this command if other users are logged in to 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 off the power.
The halt command logs the shutdown by 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 that 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 it stops. |
-p | Halts the system without a power down. Note: The -p flag
has no effect if used in combination with flags not requiring a permanent
halt. Power is
still turned off if other operands request a delayed power-on and
restart.
|
-q | Causes a quick halt. Notes:
|
-y | Halts the system from a dial-up operation. |
Security
Examples
- To halt the system without logging the halt in the accounting
file, enter the following command:
halt -l
- To halt the system quickly, enter the following command:
halt -q
- To halt the system from a dial-up operation, enter the following
command:
halt -y
Files
Item | Description |
---|---|
/etc/rc | Specifies the system startup script. |
/var/adm/wtmp | Specifies the login accounting file. |