Unix Domain Socket¶
Unix Domain Socket is a recurring operating systems, interprocess communication identity in which processes on one Unix-like host exchange streams, datagrams, or sequenced packets through a local socket namespace.
Core Idea¶
A Unix domain socket is an operating-system-managed communication endpoint for processes on the same Unix or Unix-like host. It uses the socket programming interface and the AFUNIX or AFLOCAL address family, but data travels through the local kernel rather than through an IP network protocol. Endpoints can provide byte streams (SOCKSTREAM), message-preserving datagrams (SOCKDGRAM), or ordered connection-oriented packets (SOCKSEQPACKET) where the platform supports them. The selected socket type determines connection semantics and message boundaries; the Unix domain determines the local addressing and transport scope. Many Unix domain sockets are bound to filesystem pathnames.
Scope of Application¶
-
Local client–server services. Daemons expose stream, datagram, or sequenced-packet endpoints without a network-routable address.
-
Privilege separation. Processes with different rights communicate through an endpoint whose filesystem permissions and peer credentials can be checked.
-
Supervisors and desktop daemons. Stable local discovery connects managed services and user-session components.
-
Containers and namespaces. Shared IPC or filesystem namespaces permit local service access when lifecycle and isolation are explicit.
-
Descriptor passing. Ancillary messages can delegate open files or other kernel capabilities with controlled authority.
Clarity¶
Unix domain socket names a local kernel communication endpoint that uses the socket interface without transporting data through an IP network. It separates address family from socket type: stream, datagram, and sequenced-packet forms retain different connection and message-boundary semantics. A pathname-bound endpoint is also not an ordinary file containing queued bytes.
Manages Complexity¶
Unix domain sockets reduce local interprocess communication to a familiar endpoint-and-socket-type interface while letting the kernel manage transport, buffering, credentials, and wakeups. The analyst tracks address namespace, stream or datagram semantics, permissions, peer identity, message boundaries, buffer limits, and lifecycle. Filesystem and abstract namespaces form branches with different cleanup and access behavior.
Abstract Reasoning¶
Transport-choice move. From same-host endpoints and required stream or message semantics, infer whether a Unix domain socket fits better than IP or shared memory. Security move. Use pathname permissions, peer credentials, and namespace rules to infer which processes may connect, while checking platform-specific behavior. Protocol move. Preserve or add message framing according to socket type rather than assuming all sockets share boundaries. Failure move. From stale pathname, full buffers, peer close, or missing endpoint, infer distinct lifecycle problems. Boundary move.
Knowledge Transfer¶
Within the home domain. Unix domain sockets transfer across local client-server applications, daemons, containers, and privilege-separated processes that exchange stream, datagram, or sequenced-packet messages through the operating-system kernel. Address namespace, permissions, descriptor passing, buffering, and endpoint lifecycle retain operational meaning. Beyond the home domain (C — communication instrument). They apply literally on compatible Unix-like systems; no cross-domain metaphor is needed. Their boundary is architectural: they are local interprocess endpoints, not Internet sockets, shared memory, files despite pathname addressing, or automatic security boundaries. Filesystem permissions and peer credentials help control access but do not validate protocol behavior.
Relationships to Other Abstractions¶
Current abstraction Unix Domain Socket Domain-specific
Parents (1) — more general patterns this builds on
-
Unix Domain Socket is a kind of Message Passing Prime
Unix Domain Socket is a domain-specific kind of Message Passing: Unix Domain Socket is a recurring operating systems, interprocess communication identity in which processes on one Unix-like host exchange streams, datagrams, or sequenced packets through a local socket namespace.
Hierarchy path (1) — routes to 1 parentless root
- Unix Domain Socket → Message Passing → Modularity → Decomposition
Neighborhood in Abstraction Space¶
Unix Domain Socket sits in a sparse region of the domain-specific corpus (70th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.
Family — Unclustered & Miscellaneous (2551 abstractions)
Nearest neighbors
- Block Storage over a Network — 0.87
- Internet socket — 0.84
- Network topology — 0.83
- Network Protocol — 0.83
- Service discovery — 0.83
Computed from structural-signature embeddings · 2026-10-08