Unix
- Pronunciation
- YOO-niks
In short
Unix is a family of operating systems that began at Bell Labs in 1969 and whose design, with small tools, files and a shell, lives on in Linux and macOS.
What is Unix?
Unix was created by Ken Thompson, Dennis Ritchie and others at AT&T's Bell Labs, starting in 1969. It was rewritten in the C language in the early 1970s, which made it unusually easy to move to new hardware, and it spread through universities and companies into many versions, such as BSD, Solaris, AIX and HP-UX.
Its design ideas outlived the original systems. Programs are small tools that each do one job well and can be chained together with pipes; almost everything, including devices, is treated as a file; and people work through a shell that runs commands. Several users, file permissions and processes were part of the system from the start.
Today "Unix-like" describes systems that follow these ideas and the POSIX standard. Linux, written from scratch in 1991, is Unix-like, and macOS is a certified Unix. That is why the same commands, such as ls, grep and ssh, work on Linux servers and on Macs alike.
Key takeaways
- Unix began at Bell Labs in 1969 and was soon rewritten in C.
- Its philosophy: small tools that each do one thing well, combined with pipes.
- Almost everything is a file, and people work through a shell.
- Linux and macOS carry the Unix design on, and POSIX standardizes it.
Example
# The five most common words in a file
tr -s ' ' '\n' < notes.txt | sort | uniq -c | sort -rn | head -5Readers ask
Is Linux Unix?
Not by descent: Linux was written from scratch and contains no original Unix code. It is Unix-like, following the same design and the POSIX standard, so in practice it behaves much like Unix. macOS, by contrast, is officially certified as Unix.
Why do servers mostly run Unix-like systems?
Linux and the BSDs are stable, free to use, easy to automate from the command line and good at running many services for a long time without a restart, so they became the usual choice for web servers and the cloud.
See also
- Operating SystemOperating Systems, p. 21An operating system (OS) is the core software that manages a computer's hardware, shares it out among programs and gives them a common way to use it.
- KernelOperating Systems, p. 17A kernel is the core part of an operating system that manages the CPU, memory, and hardware devices and controls how programs get access to those resources.
- ShellOperating Systems, p. 27A shell is a program that reads commands typed by a user or written in a script and asks the operating system to run them, usually through a text interface.
- ProcessOperating Systems, p. 23A process is a running instance of a program, with its own memory space, resources, and at least one thread of execution managed by the operating system.
- File PermissionsOperating Systems, p. 11File permissions are rules stored with each file that decide which users may read it, change it, or run it, enforced by the operating system on every access.
- Command Line InterfaceOperating Systems, p. 2A command line interface (CLI) is a text-based way of using a computer: you type a command with options and arguments, press Enter, and read its output.
- BashProgramming Languages, p. 2Bash is a Unix shell and scripting language, the default on most Linux systems, used both to type commands interactively and to automate tasks with scripts.
- TerminalOperating Systems, p. 32A terminal is the program that shows a text interface, passing your keystrokes to a shell or command-line program and displaying the text it sends back.
- sudoOperating Systems, p. 29sudo lets a permitted user run a single command with root's or another user's privileges, after confirming their own password, and logs what was run.
Spotted a mistake or something missing on this page?Suggest an edit