The history of Unix dates back to the mid-1960s, when the Massachusetts Institute of Technology, Bell Labs, and General Electric were jointly developing an experimental time-sharing operating system called Multics for the GE-645 mainframe. Multics introduced many innovations, but also had many problems. Bell Labs, frustrated by the size and complexity of Multics but not its aims, slowly pulled out of the project. Their last researchers to leave Multics – among them Ken Thompson, Dennis Ritchie, Doug McIlroy, and Joe Ossanna – decided to redo the work, but on a much smaller scale.
In 1979, Ritchie described the group's vision for Unix:
1960s Multics
In the late 1960s, Bell Labs was involved in a project with MIT and General Electric to develop a time-sharing system, called Multics, allowing multiple users to access a mainframe simultaneously. A key concept of the Multics system was the use of a single-level store. In this concept, there is no directly accessible file system. Instead, programs simply refer to data as if it is already in memory; if it is not, the virtual memory (VM) system loads it automatically. This means programs do not have to write code to explicitly read and write data from files into memory to manipulate it, the operating system does this all invisibly.
The Multics project began to bog down, and it became clear to the Bell team that the system was unlikely to deliver a working operating system in the near term, let alone a reasonably performant one. Bell Labs management ultimately withdrew from the project, and it seemed likely the company was going to end their lease on the very expensive GE 645 mainframe. Ken Thompson, a programmer in the Labs' computing research department, enjoyed the flexibility of Multics and began considering a new operating system that could run on less sophisticated machines.
New system The basic concept was to use Multics' hierarchical file system, but remove the single-level store. Thompson felt that the idea of a single-level store was ultimately a bad one, as it treats all memory the same, whether program code or data, when in actual use they were treated very differently. Program code is rarely modified at runtime, may be placed in a read-only area of memory, and is randomly accessed due to branching. In contrast, data are almost always writable, as runtime modification of file data is often the entire point of the program, and sequential access, as opposed to random, is a normal means of access. While his new system would require programmers to write their own routines to load and save data, that did not appear to be unreasonable.
Thompson began writing simulations of the new system under Multics, to understand the paging performance of the system. As this appeared promising, Thompson began writing the system for the GE 645, starting with a new custom assembly language. It soon became clear that the 645 would be gone in some months, and the work was abandoned. Throughout this period, Thompson also repeatedly petitioned management to purchase a smaller system than the GE 645 in order to build a similarly programmer-friendly operating system. Management refused all of these requests.
Space Travel, move to PDP-7 In 1969, Thompson had also written a video game, Space Travel, under the GECOS operating system on the smaller GE 635 machine. This had the problem that a typical game cost $75 worth of billable CPU runtime. When he learned that Visual and Acoustics Research department had a small PDP-7 that was largely unused, he began to rewrite the game for this machine. This was initially performed by building a binary for the PDP-7 using a cross compiler on the 635, and then moving the resulting code to the PDP-7 using paper tape.
This became tedious, and Thompson began considering writing his new operating system on the new machine. This was aided by a timely vacation by his wife, leaving him with a month to work on it full time. "In August 1969, Ken Thompson's wife Bonnie took their year-old son on a trip to California to show off to their families. As a temporary bachelor, Ken had time to work. 'I allocated a week each to the operating system, the shell, the editor and the assembler [he told me]... and during the month she was gone, it was totally rewritten in a form that looked like an operating system'" Aided by Ritchie and Rudd Canaday, they implemented a version of the hierarchical file system Thompson had studied on the GE 645. The ability to start programs stored in that file system soon followed, and then small programs to copy, delete, print and edit those files, along with a command-line interpreter to allow the user to perform all of these operations interactively. With these in place, a new assembler was written for the machine, and Space Travel moved entirely to the new platform.
A key concept that was added during this period was made by Ritchie, the concept of a device file. This was a file in the file system with the special ability to perform input/output operations. This allowed different devices to be supported simply by placing a file in an appropriate location in the file system. Read and write operations accessing these pseudo-files would perform operations on the device itself. This meant that devices were abstracted away through the file system, and programs could manipulate files no matter what sort of device they were on.
Douglas McIlroy then ported TMG compiler-compiler to PDP-7 assembly, creating the first high-level language running on Unix. Thompson used this tool to develop the first version of his B programming language.
1970s
The new operating system was initially without organizational backing, and without a name. At this stage, the new operating system was a singletasking operating system, not a multitasking one such as Multics. The name Unics (Uniplexed Information and Computing Service, pronounced as "eunuchs"), a pun on Multics (Multiplexed Information and Computer Services), was initially suggested for the project in 1970. Brian Kernighan claims the coining for himself, and adds that "no one can remember" who came up with the final spelling Unix. Dennis Ritchie and Doug McIlroy also credit Kernighan.
When the Computing Sciences Research Center wanted to use Unix on a machine larger than the PDP-7, while Bell Labs Patent Department needed a word processor, Thompson and Ritchie added text processing capabilities to Unix and received funding for a PDP-11/20. For the first time in 1970, the Unix operating system was officially named and ran on the PDP-11. A text-formatting program called roff and a text editor were added. All three were written in PDP-11 assembly language. Bell Labs used this initial text-processing system, consisting of Unix, roff, and the editor, for text processing of patent applications. Roff soon evolved into troff, the first electronic publishing program with full typesetting capability.
As the system grew in complexity and the research team wanted more users, the need for a manual grew apparent. The UNIX Programmer's Manual was published on 3 November 1971; commands were documented in the "man page" format that is still used, offering terse reference information about usage as well as bugs in the software, and listing the authors of programs to channel questions to them.
As other Bell Labs departments purchased DEC PDP-11s, they also chose to run Unix instead of DEC's own operating system. By Version 4 it was widely used within the laboratory and a Unix Support Group was formed, helping the operating system survive by formalizing its distribution.
In 1973, Version 4 Unix was rewritten in the higher-level language C, contrary to the general notion at the time that an operating system's complexity and sophistication required it to be written in assembly language. The C language appeared as part of Version 2. Thompson and Ritchie were so influential on early Unix that McIlroy estimated that they wrote and debugged about 100,000 lines of code that year, stating that "[their names] may safely be assumed to be attached to almost everything not otherwise attributed". Although assembly did not disappear from the man pages until Version 8, the migration to C suggested portability of the software, requiring only a relatively small amount of machine-dependent code to be replaced when porting Unix to other computing platforms. Version 4 Unix, however, still had considerable PDP-11-dependent code and was not suitable for porting.
The Unix operating system was first presented formally to the outside world at the 1973 Symposium on Operating Systems Principles, where Ritchie and Thompson delivered a paper. This led to requests for the system, but under a 1956 consent decree in settlement of an antitrust case, the Bell System (the parent organization of Bell Labs) was forbidden from entering any business other than "common carrier communications services", and was required to license any patents it had upon request. Unix could not, therefore, be turned into a product. Bell Labs instead shipped the system for the cost of media and shipping. Ken Thompson quietly began answering requests by shipping out tapes and disks. The only recovered Unix v4 tape as of 2025 had been sent by Thompson to the University of Utah on May 31, 1974.
In 1973, AT&T released Version 5 Unix and licensed it to educational institutions, and licensed 1975's Version 6 to companies for the first time, starting with Yourdon, Inc. While commercial users were rare because of the cost, the latter was the most widely used version into the early 1980s. Anyone could purchase a license, but the terms were very restrictive; licensees only received the source code, on an as-is basis. The licenses also included the machine-dependent parts of the kernel, written in PDP-11 assembly language. Copies of the Lions' Commentary on UNIX 6th Edition, with Source Code circulated widely, which led to considerable use of Unix as an educational example. The first meeting of Unix users took place in New York in 1974, attracting a few dozen people; this would later grow into the USENIX organization. The importance of the user group stemmed from the fact that Unix was entirely unsupported by AT&T, although from about 1975 it was the standard for building operational systems within the company.
Versions of the Unix system were determined by editions of its user manuals; for example, "Fifth Edition UNIX" and "UNIX Version 5" have both been used to designate the same version. The Bell Labs developers did not think in terms of "releases" of the operating system, instead using a model of continuous development, and sometimes distributing tapes with patches (without AT&T lawyers' approval). Development expanded, adding the concept of pipes, which led to the development of a more modular code base, and quicker development cycles. Version 5, and especially Version 6, led to a plethora of different Unix versions both inside and outside Bell Labs, including PWB/UNIX and the first commercial Unix, IS/1.
Unix still only ran on DEC systems. As more of the operating system was rewritten in C (and the C language extended to accommodate this), portability also increased; in 1977, Bell Labs procured an Interdata 8/32 with the aim of porting Unix to a computer that was as different from the PDP-11 as possible, making the operating system more machine-independent in the process. Unix next ran as a guest operating system inside a VM/370 hypervisor at Princeton. Simultaneously, a group at the University of Wollongong ported Unix to the similar Interdata 7/32. Target machines of further Bell Labs ports for research and AT&T-internal use included an Intel 8086-based computer (with custom-built MMU) and the UNIVAC 1100.
In May 1975, ARPA documented the benefits of the Unix time-sharing system which "presents several interesting capabilities" as an ARPA network mini-host in RFC 681.