Is there a POSIX way to shutdown a UNIX machine?

No, POSIX does not care about the shutting down or rebooting of a Unix system, nor about how services are started at boot.

The following areas are outside of the scope of POSIX.1-2017:

  • Graphics interfaces

  • Database management system interfaces

  • Record I/O considerations

  • Object or binary code portability

  • System configuration and resource availability

POSIX.1-2017 describes the external characteristics and facilities that are of importance to application developers, rather than the internal construction techniques employed to achieve these capabilities. Special emphasis is placed on those functions and facilities that are needed in a wide variety of commercial applications.

(from the Introduction section of the POSIX Base Definitions)

The shutdown command would fall into the "System configuration and resource availability" category, and it's not a tool that is important to application developers.


The full POSIX standard is available online.


A review of the list of all POSIX commands beginning on page 4, shows no equivalent to halt or shutdown.

Tags:

Shutdown

Posix