halt - Unix, Linux Command


Advertisements


NAME

halt - reboot or stop the system

SYNOPSIS

halt [OPTION]...

DESCRIPTION

These programs allow a system administrator to reboot, halt or poweroff the system.

When called with --force or when in runlevel 0 or 6, this tool invokes the reboot system call itself and directly reboots the system. Otherwise this simply invokes the shutdown tool with the appropriate arguments.

Options

Tag Description
-f, --force Does not invoke shutdown and instead performs the actual action you would expect from the name.
-p, --poweroff Instructs the halt command to instead behave as poweroff.
-w, --wtmp-only Does not call shutdown or the reboot system call and instead only writes the shutdown record to /var/log/wtmp
--verbose Outputs slightly more verbose messages when rebooting, useful for debugging problems with shutdown.

EXAMPLES

Example-1:

The halt command will cease all CPU function on the system. On most systems, this will drop you into single-user mode and then power off the machine:

$ halt

output:
Broadcast message from ubuntu@ubuntu
root@ubuntu:/var/log#   (/dev/pts/0) at 7:38 ...

The system is going down for halt NOW!

Example-2:

To poweroff system using halt command, use -p option

$ halt -p

output:

Broadcast message from ubuntu@ubuntu
        (/dev/pts/0) at 17:54 ...

The system is going down for power off NOW!

Example-3:

To write shutdown record to /var/log/wtmp, use -w option.

$ halt -w

output:

no output on screen, record will be written to /var/log/wtmp



Advertisements