Unix

On this page 7

Unix is a family of multiuser, multitasking operating systems that descends from the system Ken Thompson and Dennis Ritchie created at Bell Labs starting in 1969, and the name also refers to the design philosophy and interface standard those systems share. Among OS fundamentals, Unix is the reference point for how operating systems structure processes, files, permissions and the shell, and most server, mobile and many desktop platforms today inherit its ideas.

Strictly speaking, UNIX in capitals is a trademark owned by The Open Group and granted only to systems certified against the Single UNIX Specification. In everyday technical usage, “Unix” or “Unix-like” also covers Linux, FreeBSD and other systems that behave like Unix without carrying the certification.

Core design principles of Unix

Unix rests on a small set of principles that made it portable, scriptable and easy to extend. The best known is “everything is a file”: devices, pipes and many kernel interfaces appear as entries in one hierarchical file system and are read or written with the same system calls.

A second principle is small programs that do one thing well, combined through pipes so that the output of one program becomes the input of the next. A third is the use of plain text as the universal interface between tools, configuration files and logs. Together, these choices let administrators build complex workflows from simple parts.

The table below summarizes the building blocks that define a Unix system and what each contributes.

ComponentRoleTypical interface
KernelManages processes, memory, devices and filesSystem calls such as fork, exec and read
ShellInterprets commands and scriptssh, bash, zsh
File systemSingle tree rooted at /Paths, inodes, mount points
Process modelParent and child processes with unique IDsfork followed by exec
PermissionsOwner, group and others with read, write, executechmod, chown, umask
SignalsAsynchronous notifications to processeskill, SIGTERM, SIGKILL
Building blocks of a Unix system

How the Unix process and permission model works

Unix creates new processes through the fork and exec pattern. The fork call duplicates the calling process, and the child then calls exec to replace its memory image with a new program. This split lets the parent adjust file descriptors, environment variables or privileges between the two steps, which is how a shell implements redirection and pipelines.

Every process runs with a user ID and group ID, and every file carries an owner, a group and nine permission bits. The kernel checks those bits on each access. The special root account with user ID 0 bypasses most checks, which is powerful for administration and dangerous when a process running as root is compromised.

Processes communicate through several inter-process communication mechanisms, including pipes, signals, sockets and shared memory. Scheduling is preemptive, so a running process can be interrupted at any time through a context switch, which made Unix a true multitasking system long before most personal computer platforms.

Major Unix and Unix-like systems

The Unix family splits into certified UNIX systems, BSD descendants and Unix-like systems written from scratch. The distinction matters for licensing and trademark use, but in daily operation the systems share commands, concepts and most programming interfaces.

SystemLineageStatus and typical use
Research UnixOriginal Bell Labs codeHistorical; ended in the late 1980s
System VAT&T commercial lineBasis of Solaris, AIX and HP-UX
BSDUniversity of California, BerkeleyAncestor of FreeBSD, OpenBSD and NetBSD
macOSDarwin with BSD userland and MachCertified UNIX on supported versions
LinuxIndependent kernel from 1991Unix-like; dominant on servers and Android
IBM AIXSystem V with IBM extensionsCertified UNIX for enterprise servers
Representative members of the Unix family

Linux is not Unix by descent or by default certification; it reimplements Unix behavior with original code. A few Linux distributions have obtained certification, but most rely on POSIX compatibility rather than the trademark.

Unix compared with POSIX, Linux and Windows

Unix, POSIX and Linux are often confused because they describe different layers of the same tradition. Unix is the system lineage, POSIX is the IEEE interface standard derived from it, and Linux is one implementation of that interface. Windows follows a separate design heritage.

ConceptWhat it isKey difference from Unix
POSIXIEEE 1003 standard for system interfacesSpecification only, not an operating system
Single UNIX SpecificationSuperset of POSIX for the trademarkDefines what may be called UNIX
LinuxUnix-like kernel plus distributionsNo shared code with original Unix
WindowsNT-based operating systemDifferent process, file and security model
FreeBSDOpen-source BSD descendantDirect code lineage, no trademark certification
How Unix relates to neighboring concepts

Windows differs in several fundamental ways: drive letters instead of a single root, access control lists as the primary permission model, CreateProcess instead of fork and exec, and a registry instead of text configuration files. Compatibility layers such as the Windows Subsystem for Linux bridge part of that gap.

Strengths, limitations and common misconceptions

The lasting strength of Unix is composability and portability: the system was rewritten in C in 1973, which let it move across hardware far more easily than assembly-based systems of its era. Its weaknesses are mostly legacy decisions that later systems patched rather than replaced.

  • Coarse permission model: the original owner-group-other scheme cannot express fine-grained rules, so modern systems add access control lists, capabilities and mandatory access control.
  • All-powerful root: a single superuser concentrates risk; privilege separation and sandboxing reduce it.
  • Fragmentation: commercial vendors diverged in the 1980s, a period often called the Unix wars, which POSIX was created to contain.
  • Misconception that Unix is obsolete: its interfaces run on most servers, smartphones and supercomputers today.
  • Misconception that Unix is one product: it is a family, a trademark and a philosophy at the same time.

The idea in brief

Unix is an old but enormously influential way of building an operating system, the software that runs a computer. It was designed so that many people could use one machine at once and so that small, simple tools could be chained together like building blocks.

Many systems you use every day, including the software inside most phones, web servers and Mac computers, follow the Unix model or copy it closely. Learning how Unix works therefore explains a large part of modern computing.

A practical scenario

A system administrator at a mid-sized web hosting company must find which customer sites generate the most server errors on a fleet of Linux and FreeBSD machines. Instead of installing a dedicated analytics product, the administrator writes a single shell pipeline that reads the web server logs, filters lines with status 500, extracts the host name, counts occurrences and sorts the result.

Because both systems share Unix tools and POSIX behavior, the same script runs unchanged on every server through a scheduled cron job. It produces a plain-text report each morning in under a minute. The team identifies two misconfigured sites within the first day, and the whole solution costs no license fees and fewer than 20 lines of code.