shutdown(8)

MILESTONE-QUALIFIED Rendered from the page's mdoc source at milestone/general-usability-qemu-20260927 (platform ff025b1) with GNU groff version 1.23.0, using the same command the image build uses; an ABSD session running man 8 shutdown prints this text. It is dated 2026-09-27; the build commands and repository files it mentions are in private sources, and later work is not in it. All pages.

SHUTDOWN(8)                 System Manager's Manual                SHUTDOWN(8)

NAME
       shutdown -- halt or restart a served ABSD machine

SYNOPSIS
       shutdown
       shutdown now
       shutdown -h | -p | -r now

DESCRIPTION
       shutdown asks the SSH server to end the boot in order: every session is
       told and ends, the file server commits and stops, and the machine
       halts, or, with -r, restarts.  -h and -p are the same as no option.
       Any other argument is refused with status 2 and changes nothing.

       It is not a program, and the operator can ask in two ways:

       `ssh host shutdown'
               The SSH server takes the command itself; nothing is started.

       shutdown typed to an interactive shell
               absd-sh(1) passes the words to the SSH server on the session's
               control channel and prints the answer.  A shell that has no
               such channel (one started by another shell) answers `no session
               control channel'.

       Either way the SSH server decides: every authenticated session of the
       operator may ask, and the first request wins; a later one is refused
       with status 1 (`a halt is already under way').  The server holds no
       right over the machine: it acts by ending its sessions and exiting with
       a status that tells init which end was asked for.  Init holds the
       machine and ends the boot.  No session process holds any right to stop
       the machine.

       In order:

       1.   The requesting session prints `ABSD is going down for halt: ...'
            and ends with status 0 (a shell prints it and then sees the end of
            its input).  New connections are refused.

       2.   Every session with something running is told `sshd: the system is
            going down for halt; this session ends' (on its terminal, or on
            standard error), and its input is closed after what the client
            already sent.  A shell, or a command reading its input, finishes;
            the session ends with its status as usual.

       3.   After 10 seconds the server ends whatever still runs; that session
            closes without an exit status (OpenSSH reports 255).

       4.   The file server commits every session's files and stops.  Every
            write it acknowledged is on the disk.

       5.   Init waits up to 20 seconds for processes the sessions left
            behind, then halts or restarts the machine.

EXIT STATUS
       0 when the request was accepted, 1 when another is already under way, 2
       for a form this page does not list.

DIAGNOSTICS
       On the serial console, in order: `SSH SHUTDOWN REQUESTED', `SSH
       SHUTDOWN GRACE OVER' (only if something had to be ended), `SSH SHUTDOWN
       COMPLETE', `FSD STOPPED', `SERVED SHUTDOWN action=halt ...
       drained=true', and `ABSD BOOT OK'.

SEE ALSO
       absd-sh(1), ps(1), filesystem(7), handles(7), afterboot(8), reboot(8)

       In the kernel repository: docs/PROCESS-STARTUP.md ("Served boot and
       orderly shutdown").

QUALIFICATION
       Qualified in a served boot (`net fsd served') under QEMU, where a halt
       ends QEMU with status 3.  A qualification boot (`net fsd') is ended by
       init's deadline for the SSH server instead, and shutdown there is not
       qualified; see afterboot(8).  On a physical machine a halt stops the
       CPU and leaves the machine powered (there is no ACPI power-off); this
       is not tested.

CAVEATS
       A process a session left running that has not ended 20 seconds after
       the file server stopped cannot be ended by init; init then stops the
       machine at once, after storage is committed (QEMU status 71, `SERVED
       SHUTDOWN UNREAPED').  There is no delay form (`shutdown +5') and no
       message to the sessions beyond the notice.

ABSD                          September 27, 2026                   SHUTDOWN(8)

All manual pages