The BSD Family: The Open-Source Unix That Survived a Lawsuit
Abstract
The Berkeley Software Distribution began in 1977 as a tape of programs that a graduate student, Bill Joy, mailed to other universities. With DARPA money, Berkeley’s Computer Systems Research Group turned it into a complete Unix with virtual memory, a fast file system and, in 4.2BSD (1983), the TCP/IP implementation through which the internet protocols reached the universities; its socket interface is still how programs open network connections. From 1989 the group rewrote the last of AT&T’s code so BSD could be given away. In 1992 AT&T’s Unix subsidiary sued, at the moment Linux was getting started; the case settled in 1994, largely in Berkeley’s favour, and three files out of 18,000 were removed. The free BSDs that grew from the 386BSD port, FreeBSD, NetBSD and OpenBSD, are smaller than Linux but run Netflix’s video servers, Juniper’s routers, Sony’s PlayStation and, as the core of Darwin, every Mac and iPhone. OpenBSD produced OpenSSH, which runs on almost every server on the internet. The BSD licence, which asks for credit and not much else, became the model for permissive open-source licensing.
Bill Joy and the First Distributions
Unix reached the University of California, Berkeley, in 1974, at the request of professor Bob Fabry, who had been in the audience when Ken Thompson and Dennis Ritchie presented it at the Symposium on Operating Systems Principles in 1973. A Version 4 tape arrived from Bell Labs in January 1974. Thompson himself spent the 1975–76 academic year at Berkeley, his alma mater, as a visiting professor, installed Version 6 and started a Pascal system that two graduate students, Bill Joy and Chuck Haley, took over and improved when he left.
Joy, who had arrived at Berkeley in 1975, wrote the line editor ex with Haley and then vi (1976), a screen-oriented mode of ex that used the whole 24-line terminal screen and let the user move the cursor through the text. Its split into an insert mode for typing and a command mode for everything else puzzled newcomers and suited touch typists; vim and neovim still follow it. Joy also wrote the C shell (csh), which added command history, job control (moving programs between foreground and background) and aliases to the Unix command line.
Other universities wanted the Berkeley programs. Early in 1977, Joy put together the first “Berkeley Software Distribution”, with the Pascal system and ex (later release lists date this tape, 1BSD, to 9 March 1978), and over the next year, acting as distribution secretary, sent out about thirty free copies. It was not an operating system but a set of programs that ran on top of a licensed AT&T Unix. The second distribution, 2BSD (May 1979), added vi and the C shell.
Virtual Memory and the CSRG
In 1978 Richard Fateman and thirteen colleagues bought a DEC VAX-11/780, the 32-bit successor of the PDP-11, with NSF and department money. AT&T’s port for it, UNIX/32V, did not use the VAX’s virtual memory hardware, so the graduate student Özalp Babaoğlu wrote a paging system and Joy helped integrate and debug it. The result, of which Joy shipped the first of nearly a hundred copies in December 1979 as 3BSD, was the first complete Berkeley operating system: a whole Unix rather than a set of add-ons.
Virtual memory on the VAX caught the attention of DARPA, which was looking for a common operating system for the research groups it funded. Fabry obtained an 18-month DARPA contract starting in April 1980, and the group that carried it out was named the Computer Systems Research Group (CSRG). 4BSD came out in November 1980, 4.1BSD in 1981. Marshall Kirk McKusick rewrote the file system for 4.2BSD; his Fast File System placed related blocks close together on the disk so that throughput could approach the speed of the disk hardware.
4.2BSD and TCP/IP
DARPA’s main requirement was networking: machines running the new system had to be able to join the ARPANET easily. Joy integrated an early TCP/IP implementation by Rob Gurwitz of BBN and tuned its performance. 4.2BSD, released in August 1983, shipped the result together with sockets, a programming interface that treated a network connection like a file descriptor. The calls socket(), bind(), connect(), send() and recv(), designed at Berkeley in 1982 and 1983, are still how programs on Unix, Linux, macOS and Windows open network connections.
With 4.2BSD, every university that ran Berkeley Unix on its VAXes had TCP/IP. The protocols spread because BSD included them, and when the National Science Foundation’s NSFNET connected universities from the mid-1980s, many of the machines on it ran BSD. The broader transition is described in The Connected World.
Joy left Berkeley in 1982 to join the founders of Sun Microsystems. Sun’s SunOS, first released in 1983, was based on 4.2BSD, and Sun’s Network File System protocol, which Sun published, was later implemented in BSD as well. The CSRG released 4.3BSD in June 1986, followed by the Tahoe and Reno versions that prepared the system for hardware other than the VAX.
Net/1, Net/2 and 386BSD
BSD still contained AT&T code, so anyone who wanted it needed an expensive AT&T source licence. Vendors of networking products asked Berkeley to release the networking code separately, and in June 1989 the CSRG published Networking Release 1 (Net/1): the TCP/IP code and utilities, which contained no AT&T code, for $1,000 per tape and no royalties. Several large sites put it up for anonymous FTP soon after.
Keith Bostic then proposed going further: rewriting every remaining AT&T utility and library from its documentation alone. He recruited volunteers, whose only reward was credit by name; the list passed one hundred utilities, and within 18 months nearly all the important utilities and libraries had been rewritten. McKusick and Bostic went through the kernel file by file. In June 1991 Berkeley released Networking Release 2 (Net/2), a nearly complete operating system that was freely redistributable. Six kernel files were missing because they had not yet been rewritten.
Two efforts filled the gap. Berkeley Software Design, Inc. (BSDi), a company formed to sell a supported version of the code, wrote the missing files and from January 1992 sold the system with source code for $995; its advertisements promised a 99 percent discount over System V and gave the phone number 1-800-ITS-UNIX. William Jolitz, a former CSRG member, and his wife Lynne Jolitz had been porting BSD to the Intel 386 PC since 1989 and described the work in a 17-part series in Dr. Dobb’s Journal from January 1991. They wrote their own replacements for the six files and released 386BSD 0.0 on 12 March 1992 and the more usable 0.1 on 14 July 1992, free by anonymous FTP.
The Lawsuit
Unix System Laboratories (USL), the AT&T subsidiary that owned Unix, sued BSDi in federal court in New Jersey in April 1992, claiming that BSDi’s product contained proprietary USL code and trade secrets. It then amended the suit to include the Regents of the University of California. In December 1992 Judge Dickinson R. Debevoise heard USL’s request for a preliminary injunction to stop the distribution of Net/2; about six weeks later he denied it and dismissed all but two of the complaints. The university countersued in California state court, arguing that USL had used Berkeley code in System V without the credit its licence required.
Novell bought USL from AT&T in 1993, and its chief executive Ray Noorda preferred to settle. The settlement of January 1994 removed three files from the roughly 18,000 in Net/2 and added USL copyright notices to about 70 others, which stayed freely redistributable. USL agreed not to sue users of the new, cleaned-up release, 4.4BSD-Lite, published in June 1994. The CSRG closed after its final release, 4.4BSD-Lite Release 2, in June 1995.
The Two Years That Went to Linux
Between Net/2 in June 1991 and 4.4BSD-Lite in June 1994, anyone building on BSD faced the possibility that the code might be ruled AT&T’s property. Linus Torvalds announced Linux in August 1991, and Linux carried no AT&T code. Torvalds himself said in a 1993 interview: “If 386BSD had been available when I started on Linux, Linux would probably never have happened.” The slow progress of 386BSD and the legal doubt over BSD both helped Linux become the free Unix-like system most PC users chose.
FreeBSD, NetBSD and OpenBSD
Users of 386BSD collected bug fixes into an unofficial “patchkit”, and when the Jolitzes would not accept outside help on their release schedule, two groups started over. NetBSD, founded by Chris Demetriou, Theo de Raadt, Adam Glass and Charles Hannum, opened its source repository on 21 March 1993 and released version 0.8 on 19 April. It made portability its goal, and its motto, “Of course it runs NetBSD”, refers to the more than fifty hardware platforms it supports.
FreeBSD got its name, coined by David Greenman, on 19 June 1993; Jordan Hubbard, Nate Williams and Rod Grimes were among its founders. Version 1.0 appeared in November 1993, sold on CD-ROM by Walnut Creek CDROM, together with the Ports Collection, a system for building third-party software from source that now covers more than 30,000 programs. To comply with the settlement, FreeBSD 2.0 (22 November 1994) was rebuilt on 4.4BSD-Lite and was the first version with no AT&T code. FreeBSD concentrated on the PC and on servers and became the most widely used BSD. Its jails (2000) partitioned one system into isolated environments, an early form of the operating-system containers that later became common on Linux. In 2003 Matthew Dillon, whose commit access had been revoked after disputes over the multiprocessor design of FreeBSD 5, forked FreeBSD 4.8 as DragonFly BSD.
OpenBSD began with a quarrel. In December 1994 the NetBSD core team asked Theo de Raadt, one of its founders, to resign; in October 1995 he forked NetBSD 1.0 as OpenBSD, a project based in Canada. The project made security its priority, auditing its code for whole classes of bugs and switching on defences such as stack protection and address randomisation by default. Its website’s count of remote holes in the default installation went from “five years without” (until June 2002) to “only two remote holes in the default install, in a heck of a long time” after a second hole was disclosed in March 2007. OpenBSD’s best-known product is OpenSSH (on its origins see Tatu Ylönen and SSH), first released in OpenBSD 2.6 in December 1999, which became the standard way to log in to Unix and Linux servers. Its packet filter pf (2001) and LibreSSL (2014), a cleaned-up fork of OpenSSL, followed the same pattern.
Where BSD Runs
The BSDs have far fewer desktop users than Linux; their code tends to end up inside other products. Netflix delivers its video from FreeBSD-based Open Connect appliances placed in internet providers’ networks. WhatsApp ran its servers on FreeBSD and kept them on it for years after Facebook bought the company in 2014; the move to Linux in Facebook’s data centres was planned around 2019. Juniper Networks builds its router operating system Junos on FreeBSD. The system software of the PlayStation 4 derives from FreeBSD 9, and the Nintendo Switch borrows some FreeBSD components.
The largest installation is Apple’s. When Apple bought NeXT in 1997 it acquired NeXTSTEP, built on the Mach kernel from Carnegie Mellon and BSD code. Darwin, the open-source core of macOS, iOS, watchOS and tvOS, combines Mach with a BSD layer that provides the process model, the networking stack, file system interfaces and the command-line tools, much of it taken from FreeBSD. The ssh command in a Mac’s Terminal and the TCP/IP stack in an iPhone descend from Berkeley. The details are in The macOS Lineage.
The License
The BSD licence lets anyone use, change and redistribute the code, in source or binary form, as long as the copyright notice and disclaimer are kept. Unlike the GNU General Public License, which governs Linux, it does not require that modified versions be released as source. That is why Apple could build macOS on BSD code without publishing all of macOS, and why Sony could put FreeBSD into a games console. The GPL’s supporters regard this as the licence’s weakness, its users as its strength.
The original licence had a clause requiring that all advertising for products using the code acknowledge the University of California. As BSD code spread into hundreds of products, each with its own notice, the clause became unworkable. On 22 July 1999 William Hoskins, director of Berkeley’s Office of Technology Licensing, wrote to all licensees that the requirement was dropped. The resulting three-clause and later two-clause BSD licences, together with the similar MIT licence, are the models for permissive licensing, and the Apache licence follows the same approach.
⚠️ Dead End: 386BSD
386BSD was the first free BSD for the PC and could have been what Linux became. The Jolitzes released 0.1 in July 1992 and then developed in private, without merging the patchkit that users were maintaining. While they worked, the users left to found NetBSD and FreeBSD, and the lawsuit made distributors cautious about anything derived from Net/2. When 386BSD 1.0 finally appeared, late in 1994 on a Dr. Dobb’s Journal CD-ROM because it was about 600 MB in size, NetBSD and FreeBSD had already moved to the clean 4.4BSD-Lite base and Linux had its first stable kernel. Nobody picked it up. In 2016 the Jolitzes posted versions 1.0 and 2.0 on GitHub.
📚 Sources
- McKusick, Marshall Kirk: “Twenty Years of Berkeley Unix: From AT&T-Owned to Freely Redistributable”, in Open Sources: Voices from the Open Source Revolution (1999), O’Reilly (Fabry at the 1973 SOSP, the Version 4 tape in January 1974, Thompson’s sabbatical at Berkeley, Joy and Haley, Pascal and ex, the first distribution early in 1977 and its thirty copies, Fateman’s VAX, Babaoğlu’s paging, 3BSD in December 1979, the April 1980 DARPA contract and the CSRG, the fast file system, Gurwitz and 4.2BSD, Net/1 at $1,000, Bostic’s rewrite, Net/2, BSDi and 1-800-ITS-UNIX, the injunction hearing, the countersuit, the settlement, 4.4BSD-Lite June 1994, end of the CSRG June 1995)
- McKusick, Marshall Kirk et al.: The Design and Implementation of the 4.4BSD Operating System (1996), Addison-Wesley
- Leffler, Samuel J. et al.: The Design and Implementation of the 4.3BSD Unix Operating System (1989), Addison-Wesley
- Salus, Peter H.: A Quarter Century of UNIX (1994), Addison-Wesley, particularly Chapters 7 to 9 on BSD
- Salus, Peter H.: Daemon, the GNU, and the Penguin (2008), on the USL lawsuit and BSD history
- Berkeley Software Distribution, Wikipedia (1BSD on 9 March 1978, release dates from 2BSD to 4.4BSD-Lite Release 2)
- UNIX System Laboratories, Inc. v. Berkeley Software Design, Inc., Wikipedia (filing April 1992, Debevoise, Noorda, settlement terms)
- 386BSD, Wikipedia (start 1989, Dr. Dobb’s series, releases 0.0 and 0.1, patchkit, 1.0 on CD-ROM, GitHub 2016)
- Salon, article on 386BSD (17 May 2000) (Torvalds’ 1993 Meta interview quote)
- NetBSD, Wikipedia (founders, 21 March 1993, 0.8 on 19 April 1993, motto, platforms)
- FreeBSD, Wikipedia (name 19 June 1993, 1.0, Walnut Creek, 2.0 without AT&T code, ports, jails, Netflix, Juniper, PlayStation 4, Nintendo Switch)
- Istocniks, Igors: “Migrating WhatsApp to Facebook’s infrastructure”, Code BEAM SF (2019), slides (FreeBSD to Linux as part of the migration)
- DragonFly BSD, Wikipedia (Dillon, June 2003, FreeBSD 4.8)
- OpenBSD, Wikipedia (de Raadt’s resignation December 1994, fork October 1995, OpenSSH in 2.6, pf, LibreSSL, the default-install slogan)
- UC Berkeley Office of Technology Licensing: letter of 22 July 1999 removing the advertising clause and BSD licenses, Wikipedia
- Image: Bill Joy at World Economic Forum (Davos), 2003-01 (cropped).jpg by SqueakBox (CC BY 2.0), via Wikimedia Commons
- Image: Theo de Raadt 2013.jpg by FAndrey (CC BY 2.0), via Wikimedia Commons