# Unix

**Unix** 是1969年由肯尼斯（肯）·汤普森（Kenneth (Ken) Thompson）和[丹尼斯·里奇](https://www.edgepedia.org/zh/dennis-ritchie)（Dennis Ritchie）在AT&T贝尔实验室（AT&T Bell Labs）创造的多用户分时操作系统，最初运行在一台闲置的[数字设备公司](https://www.edgepedia.org/zh/digital-equipment-corporation)（DEC）PDP-7小型计算机上<sup>[1](https://www.computerhistory.org/timeline/1969/)</sup><sup> • </sup><sup>[2](https://www.nokia.com/bell-labs/about/history/innovation-stories/50-years-unix/)</sup>。它引入了层次化文件系统、对文件与设备的统一处理方式，以及一小组可组合的工具；它的后裔——包括Linux、BSD各系统，以及AIX、Solaris、macOS等经认证的UNIX产品——如今构成了世界计算基础设施的很大一部分<sup>[1](https://www.computerhistory.org/timeline/1969/)</sup><sup> • </sup><sup>[3](https://www.opengroup.org/openbrand/register/)</sup>。

| 关键事实 | 详情 |
|---|---|
| 起源 | 1969年，在AT&T退出Multics项目之后，由肯·汤普森和丹尼斯·里奇在AT&T贝尔实验室一台很少使用的PDP-7小型计算机上开发<sup>[1](https://www.computerhistory.org/timeline/1969/)</sup><sup> • </sup><sup>[2](https://www.nokia.com/bell-labs/about/history/innovation-stories/50-years-unix/)</sup> |
| 名称 | 对Multics的戏仿：“非多路复用信息与计算服务”（Un-multiplexed Information and Computing Service，简称Unics），因为新系统最初只支持一个用户；后来拼写演变为Unix<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup> |
| 第一版 | 手册于1971年11月完成；内核约4,200行代码，运行于16 KB主存，提供34个系统调用<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup> |
| 里程碑论文 | 《The UNIX Time-Sharing System》，丹尼斯·M.里奇与肯·汤普森，《ACM通讯》 17(7):365–375，1974年<sup>[5](https://refs.drheap.org/ritchie1974unix/)</sup> |
| 语言 | 用C语言重写——C由里奇在1970年代初开发——这使系统摆脱了特定硬件的束缚，从而可移植<sup>[6](https://www.unix.org/about.html)</sup><sup> • </sup><sup>[7](https://archive.computerhistory.org/resources/access/text/2022/08/102804421-05-01-acc.pdf)</sup> |
| 标准 | 单一UNIX规范第5版（2024年），其核心是POSIX.1-2024（IEEE Std 1003.1-2024，基础规范第8版）<sup>[8](https://www.unix.org/overview.html)</sup> |
| 商标 | “UNIX”是The Open Group的商标；只有通过单一UNIX规范认证的系统才能使用该商标<sup>[3](https://www.opengroup.org/openbrand/register/)</sup> |

## 贝尔实验室的起源

汤普森和里奇在1960年代后半段一直从事Multics的工作，那是与[通用电气](https://www.edgepedia.org/zh/general-electric)（General Electric）和麻省理工学院（MIT）联合为大型机开发的一款实验性分时操作系统<sup>[2](https://www.nokia.com/bell-labs/about/history/innovation-stories/50-years-unix/)</sup>。Multics雄心勃勃，但进度落后，AT&T于1969年退出该项目<sup>[2](https://www.nokia.com/bell-labs/about/history/innovation-stories/50-years-unix/)</sup><sup> • </sup><sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。此后，[贝尔实验室](https://www.edgepedia.org/zh/bell-labs)管理层不愿再允许进行操作系统方面的工作，研究人员颇感沮丧<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。

新系统始于汤普森、里奇和鲁德·卡纳迪（Rudd Canaday）在纸上勾勒的一份文件系统设计<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。汤普森还写过一个游戏《太空旅行》（Space Travel），在实验室的GE-645大型机上每运行一次要花费约75美元的CPU时间；他将其改写，以便在一台积满灰尘、很少使用的PDP-7上运行——那是同事们为一个电路分析项目买的<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。1969年夏天，趁妻子带着刚出生的儿子回娘家探亲，汤普森为那台PDP-7写下了后来成为Unix的相当一部分内容<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。到1969年底，他已经能在PDP-7本机上编写操作系统代码了<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。

为了获得更好的硬件，汤普森和里奇把申请一台DEC PDP-11的请求包装成一个为编辑和排版文本构建工具的项目，操作系统几乎只是附注。管理层批准了，机器于1970年5月订购，磁盘驱动器到货后系统便迁移了过去<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。

## 早期设计与成长

程序员手册的第一版于1971年11月完成，早期的Unix系统以相继出版的手册版本来命名<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。第一版提供了层次化文件系统，目录中可以包含其他目录，但带有如今看来极为严苛的限制：文件最大64千字节，文件名最长六个字符<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。程序员可以调用34个底层操作系统例程，其中大多数至今仍在现代Unix和Linux系统上使用<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。

Unix的第一次真实世界考验来自贝尔实验室内部：AT&T专利部门的三名打字员用它来撰写、编辑和排版专利申请。专利部门采用了该系统，这使研究人员赢得了信任，得以争取一台更强大的PDP-11<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。

1974年，里奇和汤普森在《ACM通讯》（*Communications of the ACM*）上发表了《The UNIX Time-Sharing System》，描述了一个面向PDP-11/40和11/45的通用、多用户、交互式操作系统，具备层次化文件系统、兼容的文件、设备与进程间I/O、异步进程、每用户命令语言，以及包括十二种语言在内的100多个子系统<sup>[5](https://refs.drheap.org/ritchie1974unix/)</sup>。这篇论文引来了大量索取软件副本的请求<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。

Unix团队还开发了C语言——里奇在1970年代初创造了它；几乎整个Unix及其工具都用C编写，该语言的效率与可读性对系统的成功贡献极大<sup>[7](https://archive.computerhistory.org/resources/access/text/2022/08/102804421-05-01-acc.pdf)</sup>。由于系统用C重写，它摆脱了特定硬件的束缚，几乎可以在任何机器上运行<sup>[6](https://www.unix.org/about.html)</sup>。贝尔实验室特意购置了一台Interdata 8/32——其架构在几乎所有重要方面都与PDP-11不同——以证明可移植性<sup>[9](https://www.electronicsguide.net/foundations-and-theory/history/microprocessor-age-1975-1985/operating-systems-and-software-standards/)</sup>。

## 分发与伯克利分支

1956年的一项同意令禁止AT&T——作为受监管的长途电话垄断企业——销售与电话无关的产品。因此Unix不能作为产品出售；AT&T改为向任何提出请求者以象征性费用授权源代码，而该同意令也阻止AT&T为其提供支持。贝尔实验室的研究人员将这一政策概括为“不做广告，不提供支持，不修漏洞，预先付款”<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。

由于没有厂商支持，早期用户自行修复漏洞、编写工具，形成了Usenix等用户组，充当交换软件磁带的交换站<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。到1976年6月，Unix已在贝尔实验室30多个开发组中常规使用，并向80多所大学提供用于教育和学术目的<sup>[7](https://archive.computerhistory.org/resources/access/text/2022/08/102804421-05-01-acc.pdf)</sup>。

**伯克利。** 1976至1977年，汤普森从贝尔实验室休假六个月，到加州大学伯克利分校（University of California, Berkeley）任教，并在那里开发了后来成为第6版的大部分内容。他返回后，伯克利的学生和教授继续改进Unix，他们的工作被纳入[伯克利软件发行版](https://www.edgepedia.org/zh/berkeley-software-distribution)（Berkeley Software Distribution，BSD）第4.2版<sup>[10](https://www.nokia.com/bell-labs/unix-history/sharing.html)</sup>。伯克利的计算机系统研究组最初由罗伯特·法布里（Robert Fabry）领导，获得了DARPA的资助，该组做了大量工作，使TCP/IP协议——互联网的基础——通过其BSD发行版得以使用<sup>[10](https://www.nokia.com/bell-labs/unix-history/sharing.html)</sup>。用于网络编程的套接字接口，以及select和mmap，于1983年出现在4.2BSD中<sup>[11](https://www.usenix.org/publications/loginonline/transcending-posix-end-era)</sup>。

Unix历史上的两大传统是BSD一系和AT&T的System III/System V一系，而贝尔实验室研究版Unix传统则相对独立于两者<sup>[12](https://www.cs.cmu.edu/~pgunn/bsd_vs_linux/index.html)</sup>。当[贝尔系统](https://www.edgepedia.org/zh/bell-system)垄断被拆分、AT&T摆脱同意令的束缚后，正统Unix的各个版本在1980年代开始商业化<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。

## 抽象与影响

Unix的核心抽象在其各变体中逐步出现：文件系统和fork系统调用自1969年第一版起就存在，exec于1971年到来，管道于1973年，信号于1973年，虚拟内存随1979年的3BSD，套接字和mmap随1983年的4.2BSD，POSIX线程于1995年<sup>[11](https://www.usenix.org/publications/loginonline/transcending-posix-end-era)</sup>。文件系统将文件视为无解释的字节序列，这使操作系统能将硬件设备表示为特殊文件，而操作文件的接口成了I/O设备事实上的接口<sup>[11](https://www.usenix.org/publications/loginonline/transcending-posix-end-era)</sup>。

Unix还使异构计算系统的大规模联网以及互联网成为现实，它的后裔见于大多数移动设备中<sup>[2](https://www.nokia.com/bell-labs/about/history/innovation-stories/50-years-unix/)</sup>。Linux——最流行的Unix后裔——驱动着绝大多数服务器<sup>[2](https://www.nokia.com/bell-labs/about/history/innovation-stories/50-years-unix/)</sup>。汤普森和里奇获得了ACM图灵奖、美国国家技术与创新奖章，并于2011年获得[日本国际奖](https://www.edgepedia.org/zh/japan-prize)<sup>[4](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)</sup>。

## 标准与认证

POSIX标准定义了[类Unix](https://www.edgepedia.org/zh/unix-like)操作系统的接口，使开发者能编写可移植的应用程序，在不同的Unix变体和指令集架构上运行<sup>[11](https://www.usenix.org/publications/loginonline/transcending-posix-end-era)</sup>。POSIX.1-2024同时是IEEE Std 1003.1-2024和The Open Group基础规范第8版，定义了一个标准的操作系统接口与环境，包括命令解释器（shell）和常用工具程序，以在源代码层面支持应用程序的可移植性<sup>[13](https://standards.ieee.org/ieee/9945/12489/)</sup>。

单一UNIX规范起初是通用API规范（Common API Specification），后成为Spec 1170，并于2024年达到第5版；其核心在技术上与POSIX.1-2024完全相同，功能扩展由X/Open系统接口（XSI）选项标识<sup>[8](https://www.unix.org/overview.html)</sup>。只有完全符合该规范并通过认证的系统才能使用UNIX商标<sup>[3](https://www.opengroup.org/openbrand/register/)</sup>。The Open Group的认证产品名录包括苹果在Apple芯片和Intel Mac上的macOS 15.0 Sequoia、IBM的AIX和z/OS、HPE的HP-UX 11i v3，以及SCO的UnixWare和OpenServer<sup>[3](https://www.opengroup.org/openbrand/register/)</sup>。

## 安全模型

传统Unix的访问控制以一个全能的无上权限root账户为中心，通常用户ID为0，可以绕过权限检查、执行任何操作；setuid机制——让命令以其属主的有效用户ID运行——是普通用户执行特权任务所必需的，但这意味着攻破某个setuid程序的攻击者会获得该程序属主的全部权限，而属主未必是root<sup>[14](https://www.ibm.com/docs/ssw_aix_71/security/rbac_unix_defic.html)</sup><sup> • </sup><sup>[20](https://www.man7.org/linux/man-pages/man2/setuid.2.html)</sup>。由于Unix安全并非其创始人的首要设计目标，且其访问控制模型以共享资源而非限制访问为中心，后来的系统增加了更强的模型，如基于角色的访问控制和可信操作系统设计<sup>[14](https://www.ibm.com/docs/ssw_aix_71/security/rbac_unix_defic.html)</sup><sup> • </sup><sup>[15](https://www.sciencedirect.com/science/article/abs/pii/S136341270200105X)</sup>。

## 当今商业Unix格局

经认证的商业Unix系统一直在萎缩。HPE于2025年12月31日终止了对HP-UX 11i v3及其[Integrity](https://www.edgepedia.org/zh/integrity)服务器的标准支持（包括持续工程支持），成熟软件支持至少延续到2028年12月31日<sup>[16](https://support.hpe.com/hpesc/public/docDisplay?docId=a00143419en_us&docLocale=en_US)</sup>。Oracle Solaris 8和9处于无限期的持续支持状态，当前版本为Solaris 10和11<sup>[17](https://www.oracle.com/solaris/technologies/releases.html)</sup>。IBM的AIX仍在积极开发中，AIX 7.3各技术级别的修复支持终止日期延续到2027年和2028年<sup>[18](https://www.ibm.com/support/pages/aix-support-lifecycle-information)</sup>。与此同时，开源后裔将这一血脉延续下去：FreeBSD——一个面向x86、ARM、AArch64、RISC-V、POWER和PowerPC计算机的开源、符合标准的类Unix操作系统——明确以忠于Unix可组合的哲学为目标<sup>[19](https://docs.freebsd.org/en/books/handbook/book/)</sup>。

## References

1. [1969, Timeline of Computer History, Computer History Museum](https://www.computerhistory.org/timeline/1969/)
2. [50 Years of Unix, Nokia Bell Labs](https://www.nokia.com/bell-labs/about/history/innovation-stories/50-years-unix/)
3. [The Register of UNIX Certified Products, The Open Group](https://www.opengroup.org/openbrand/register/)
4. [The Strange Birth and Long Life of Unix, Warren Toomey, IEEE Spectrum (2011)](https://spectrum.ieee.org/the-strange-birth-and-long-life-of-unix)
5. [Dennis M. Ritchie and Ken Thompson (1974). The UNIX Time-Sharing System. Communications of the ACM 17(7):365–375](https://refs.drheap.org/ritchie1974unix/)
6. [About UNIX, The Open Group](https://www.unix.org/about.html)
7. [A History of Computing at Bell Laboratories (1937–1975), Computer History Museum archive](https://archive.computerhistory.org/resources/access/text/2022/08/102804421-05-01-acc.pdf)
8. [The Single UNIX Specification Version 5 (2024), Introduction, unix.org](https://www.unix.org/overview.html)
9. [Operating Systems and Software Standards, Electronics Guide](https://www.electronicsguide.net/foundations-and-theory/history/microprocessor-age-1975-1985/operating-systems-and-software-standards/)
10. [Sharing UNIX with the Rest of the World, Nokia Bell Labs Unix History](https://www.nokia.com/bell-labs/unix-history/sharing.html)
11. [Transcending POSIX: The End of an Era?, Pekka Enberg, Ashwin Rao, Jon Crowcroft, Sasu Tarkoma, USENIX ;login: (2022)](https://www.usenix.org/publications/loginonline/transcending-posix-end-era)
12. [BSD vs Linux, David Gunn, Carnegie Mellon University](https://www.cs.cmu.edu/~pgunn/bsd_vs_linux/index.html)
13. [IEEE/ISO/IEC 9945, POSIX.1-2024, IEEE Standards Association](https://standards.ieee.org/ieee/9945/12489/)
14. [Traditional UNIX Administration Limitations, IBM AIX documentation](https://www.ibm.com/docs/ssw_aix_71/security/rbac_unix_defic.html)
15. [Design of Secure Unix, Information Security Technical Report 7(1), 2002](https://www.sciencedirect.com/science/article/abs/pii/S136341270200105X)
16. [HP-UX 11i v3 and HPE Integrity i4/i6 Servers: Standard Support Ends December 31, 2025, HPE Support Center](https://support.hpe.com/hpesc/public/docDisplay?docId=a00143419en_us&docLocale=en_US)
17. [Solaris Operating System Releases, Oracle](https://www.oracle.com/solaris/technologies/releases.html)
18. [AIX Support Lifecycle Information, IBM](https://www.ibm.com/support/pages/aix-support-lifecycle-information)
19. [FreeBSD Handbook, FreeBSD Documentation Portal](https://docs.freebsd.org/en/books/handbook/book/)
20. [setuid(2) - Linux manual page](https://www.man7.org/linux/man-pages/man2/setuid.2.html)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Operating systems › Unix-like and Linux › Unix, BSD, and kernel internals

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/unix

English original: https://www.edgepedia.org/unix
