POSIX
A family of IEEE standards defining the API, shell, and utility interfaces for Unix-like operating systems to ensure software portability.
Also known as: Portable Operating System Interface
Category: Software Development
Tags: operating-systems, standards, unix
Explanation
POSIX (Portable Operating System Interface) is a family of standards specified by IEEE and standardized by ISO, defining the API, command-line interface, and utility interfaces for Unix-like operating systems. The name was suggested by Richard Stallman in response to an IEEE request. First published in 1988 as IEEE 1003.1, POSIX ensures software portability across different Unix variants.
POSIX compliance means applications can run on any conforming system with minimal modification. While no operating system is fully POSIX-compliant, Linux, macOS (which is certified), FreeBSD, and other Unix-like systems implement most POSIX standards, enabling portable shell scripts and C programs across platforms.
POSIX defines several key areas of operating system functionality. System calls cover file operations, process control, and signals. C library functions include standard functions like fork(), exec(), and open(). Shell and utilities encompass Bash-compatible shell and standard commands such as ls, grep, and awk. Threading is handled through the POSIX threads (pthreads) API. Regular expressions define both basic and extended regex syntax. Environment variables establish conventions for PATH, HOME, and USER.
The key POSIX standards include POSIX.1 for the core OS interface (system calls and C library), POSIX.2 for shell and utilities, POSIX.1b for real-time extensions, POSIX.1c for threads (pthreads), and POSIX.1-2017 as the current combined standard.
POSIX matters for several important reasons. It enables portability, allowing developers to write once and run on multiple Unix-like systems. It ensures shell scripts are POSIX-compliant and work across platforms. It provides standards compliance as a common baseline for Unix-like development. It facilitates interoperability through consistent behavior expectations across different systems.
Related Concepts
← Back to all concepts