From UNIX to Linux: The History That Explains Everything
Exit

Lesson 3 of 7 · History

GNU and free software

30 min Debian 12

Objective

Understand where most of the tools you will use on Linux come from, what "free software" means, and learn to read the main licences (GPL, BSD, MIT) you will come across in your job.

Key points

  • In 1983, Richard Stallman announced the GNU Project: a complete UNIX-like system, entirely free.
  • In 1985, he created the Free Software Foundation (FSF). The GPL licence followed in 1989.
  • Free software guarantees four freedoms: to use, to study, to redistribute, and to modify and share your modifications.
  • The GPL is copyleft: anyone who redistributes a modified GPL program must redistribute it under the GPL. The BSD and MIT licences are permissive: you can do almost anything you want with the software.
  • In 1998, the term open source appeared: the same technical reality, with a message aimed more at businesses.

1. The problem: code becomes closed (late 1970s)

In the early years of computing, programmers naturally exchanged their code, just as researchers exchange their results. UNIX itself circulated with its source code in universities (lesson 0.1).

Around the start of the 1980s, everything changed: vendors realised that software could be sold separately from the machine. Source code became a trade secret. Users received programs that were already compiled, which they had no right to study, no right to fix and no right to share.

Richard Stallman, a programmer at the MIT Artificial Intelligence Laboratory, experienced this change as an injustice. A famous anecdote illustrates it: his laboratory's printer often jammed. On the old printer, he had modified the program to warn users of a paper jam. For the new one, the manufacturer refused to provide the source code. It was impossible to fix what was actually a simple problem.

2. 1983: the announcement of the GNU Project

On 27 September 1983, Stallman announced on Usenet (the ancestor of online forums) an extraordinary project: to write a complete operating system, compatible with UNIX, and entirely free. He called it GNU, a recursive acronym that means "GNU's Not Unix".

Why UNIX-compatible? Because UNIX is well designed (lesson 0.1), it is divided into small programs that can be rewritten one by one, and users would be able to move from one to the other without relearning everything.

Work began in January 1984, when Stallman left his job at MIT so that the university could not claim his code. In 1985, he published the GNU Manifesto, which explains his approach, and founded the Free Software Foundation (FSF) to fund the project.

3. The GNU building blocks you will use every day

Piece by piece, the GNU Project rewrote the UNIX tools. By the end of the 1980s, almost nothing was missing:

GNU tool Date Role Command
GNU Emacs 1984-1985 Text editor emacs
GCC (GNU C Compiler, today the GNU Compiler Collection) 1987 Compiler: it was used to compile Linux gcc
Bash (Bourne Again Shell, Brian Fox) 1989 The shell, compatible with Bourne's sh shell bash
coreutils (merger of fileutils, textutils, shellutils) 1990s-2000s The basic commands ls, cp, mv, cat, chmod
grep, sed, gawk, tar, gzip, find 1980s-1990s Searching, transforming, archiving grep, sed, awk, tar
glibc from 1987 The C library, used by almost every program (invisible, but everywhere)

Check for yourself:

ls --version | head -n 1      # ls (GNU coreutils) …
bash --version | head -n 1    # GNU bash, version …
grep --version | head -n 1    # grep (GNU grep) …

However, one essential piece was missing: the kernel, the program that talks directly to the hardware. The kernel planned by GNU, the Hurd (started in 1990), is very ambitious and has progressed slowly. It is still not used in production today. Linux would provide this missing piece in 1991 (lesson 0.4).

4. The four freedoms

For Stallman, "free" is about freedom, not price. His phrase: free as in "free speech", not as in "free beer". French is lucky enough to have two separate words: libre (free as in freedom) and gratuit (free of charge).

A program is free software if its user has the four freedoms (numbered from zero, as any good computer scientist would):

Freedom What you can do Concrete example
0 Use the program, for any purpose Install Linux on the 200 checkouts of a retail chain, without counting licences
1 Study how it works and adapt it (so you need the source code) Read the code of a web server to understand an error
2 Redistribute copies Give a colleague a USB installation key
3 Improve the program and share your improvements Fix a bug and send the patch to the project

Free software can be sold: Red Hat sells subscriptions to RHEL, which is made of free software. And software that costs nothing is not necessarily free software: many no-cost applications hide their code.

5. The GPL and copyleft (1989)

To guarantee these freedoms, Stallman uses… copyright law itself. The GNU General Public License (GPL) says, in essence:

You may use, study, modify and redistribute this program. But if you redistribute a modified version, you must release it under the same licence, with its source code.

This is the principle of copyleft (a play on the word copyright): freedom is passed on, and nobody can take it away along the way.

Version Year Key point
GPL v1 1989 First version
GPL v2 1991 The licence of the Linux kernel ("version 2 only")
GPL v3 2007 Protects against patents and against devices that prevent you from installing a modified version
LGPL 1991 A "lighter" version for libraries: a non-free program can use them
AGPL 2007 (v3) Extends the obligation to software used remotely, over the network (web applications)

An important point for an administrator: the GPL imposes nothing on you as long as you do not redistribute. You can modify GPL software for your company's servers without publishing anything. (The AGPL is the exception: if you offer the service to the public over the network, you must give the code to its users.)

6. 1998: the "open source" movement

In January 1998, the company behind the Netscape browser announced that it would publish its source code (which would become Mozilla, then Firefox). It was a shock: a large company was opening up its flagship product.

A few weeks later, in February 1998, a group of developers, including Eric S. Raymond and Bruce Perens, proposed a new term: open source, coined by Christine Peterson. They founded the Open Source Initiative (OSI). Their idea: to talk to businesses about quality, reliability and costs, rather than about ethics and freedom.

Free software (FSF) Open source (OSI)
Main argument A question of ethics: the user must be free A question of efficiency: open development produces better software
Emblematic figure Richard Stallman Eric S. Raymond, Bruce Perens
Reference text The four freedoms The Open Source Definition, derived from Debian's principles (DFSG)
In practice The recognised licences are almost the same

Raymond's essay, The Cathedral and the Bazaar (1997), compares two ways of developing software: in a small closed group (the cathedral) or in the open, with thousands of contributors (the bazaar, the Linux model). It gave us an often-quoted idea: with enough eyes, all bugs are easy to find.

You will often see the abbreviation FLOSS or FOSS (Free/Libre and Open Source Software), which brings the two camps together.

7. The licences you will come across

On a server, every piece of software has its licence. Here are the main families:

Licence Type What it requires Examples
GPL (v2, v3) Strong copyleft Redistribute modifications under the GPL, with the source code Linux kernel (v2), bash, GCC, coreutils
LGPL Weak copyleft Copyleft on the library, not on the program that uses it glibc
AGPL Network copyleft Also provide the code to the users of the online service Some web software (Nextcloud, for example)
BSD (2 or 3 clauses) Permissive Keep the copyright notice FreeBSD, OpenSSH (for the most part)
MIT Permissive Keep the copyright notice, nothing else X Window (X11), Node.js, jQuery
Apache 2.0 Permissive Copyright notice + a patent clause Apache httpd server, Kubernetes, Android (largely)

The example that makes the difference clear: Apple was able to reuse BSD code in macOS without publishing its modifications, because the BSD licence allows it. An Internet router manufacturer that modifies the Linux kernel, on the other hand, must provide the source code of its modifications to its customers, because the kernel is under the GPL.

On Debian, the texts of common licences are stored in a single directory, and each package describes its licence:

ls /usr/share/common-licenses/          # GPL-2, GPL-3, LGPL, BSD, Apache-2.0…
head -n 3 /usr/share/common-licenses/GPL-3
# On a full Debian system, each package has its licence file:
# /usr/share/doc/<paquet>/copyright

8. GNU/Linux or Linux?

Stallman asks people to say GNU/Linux, because the complete system owes a great deal to the GNU tools, and not only to the kernel. Debian follows this usage ("Debian GNU/Linux"). Most people, and most companies, simply say Linux.

In this course, we say "Linux" for convenience, but remember the technical truth: Linux is the kernel; a large part of the tools around it come from GNU. And some "Linux" systems use almost no GNU software: Android, for example, or the Alpine distribution (with BusyBox and the musl library).

9. The lesson timeline

1983  27 September: Stallman announces the GNU Project
1984  Work begins; Stallman leaves MIT
1985  GNU Manifesto; Free Software Foundation created
1987  GCC
1989  GPL v1; Bash
1990  Start of the Hurd, the kernel planned by GNU
1991  GPL v2; LGPL
1992  The Linux kernel moves to the GPL: the free system is complete
1997  "The Cathedral and the Bazaar" (Eric S. Raymond)
1998  Netscape opens its code; birth of the term "open source" and of the OSI
2007  GPL v3 and AGPL v3

Common misconceptions

  • "Free software means it costs nothing." No. Free software is about rights; free software can be sold (RHEL subscriptions, SUSE support…).
  • "Open source means anyone can modify the official software." No. You can modify your copy. For your patch to enter the official project, it must be accepted by its maintainers.
  • "The GPL forces you to publish the code of everything you develop on Linux." No. A program that runs on Linux is not affected. Only redistributed modifications of GPL software are.
  • "Free software is for amateurs." The largest websites in the world, banks and telecom operators run on free software.

Lab

On your Debian 12 machine, you will find GNU's signature and the installed licences:

ls --version | head -n 1
bash --version | head -n 1
ls /usr/share/common-licenses/
grep -m1 Version /usr/share/common-licenses/GPL-3

The tasks: note the GNU mention of ls and bash, list the licences provided by Debian, and find the date of the GPL 3. Then click Check.


Quiz

  1. What does the name "GNU" mean, and in what year was the project announced?
  2. Name the four freedoms of free software.
  3. What is copyleft? Which licence is its best-known example?
  4. A company modifies the code of a program under the MIT licence and sells it without publishing its modifications. Is it allowed to? And if the program were under the GPL?
  5. Which piece was the GNU Project missing in the early 1990s?
Answers
  1. GNU's Not Unix, a recursive acronym; announced on 27 September 1983 by Richard Stallman.
  2. 0 use for any purpose; 1 study and adapt (access to the source code); 2 redistribute copies; 3 improve and share the improvements.
  3. The principle that modified and redistributed versions must remain under the same free licence. The typical example is the GPL.
  4. With MIT: yes, it only needs to keep the copyright notice. With the GPL: no, if it redistributes a modified version, it must provide the source code under the GPL.
  5. The kernel (the Hurd was not ready): Linux provided it.

Reference sources: GNU Project texts (gnu.org), Open Source Definition (opensource.org), Debian Policy. Original MasterLinux text.

Practical exercises

To do on Debian 12

The online terminal is coming soon. Meanwhile, do these tasks on your own Linux machine, a virtual machine or WSL.

  1. The basic commands come from the GNU Project. Save the first line of ls --version in /root/ls.txt
    Show a hintA pipe to head keeps the first line: ls --version | head -n 1 > /root/ls.txt
    Show the solution
    ls --version | head -n 1 > /root/ls.txt

    Check : grep -q 'GNU coreutils' /root/ls.txt

  2. Do the same for the shell: save the first line of bash --version in /root/bash.txt
    Show a hintbash --version | head -n 1 > /root/bash.txt
    Show the solution
    bash --version | head -n 1 > /root/bash.txt

    Check : grep -q 'GNU bash' /root/bash.txt

  3. Debian stores the text of common licences in /usr/share/common-licenses. Save the list of this directory in /root/licences.txt
    Show a hintls /usr/share/common-licenses > /root/licences.txt
    Show the solution
    ls /usr/share/common-licenses > /root/licences.txt

    Check : grep -q '^GPL' /root/licences.txt && grep -q '^BSD' /root/licences.txt

  4. Find the line that gives the version and date of the GPL 3 (first word “Version” in /usr/share/common-licenses/GPL-3) and save it in /root/gpl.txt
    Show a hintgrep -m1 stops at the first match: grep -m1 Version /usr/share/common-licenses/GPL-3 > /root/gpl.txt
    Show the solution
    grep -m1 Version /usr/share/common-licenses/GPL-3 > /root/gpl.txt

    Check : grep -q 'Version 3' /root/gpl.txt

Official references consulted: GNU Project — « What is Free Software? », « The GNU Manifesto » (gnu.org) ; Open Source Initiative — The Open Source Definition (opensource.org) ; Debian Policy — /usr/share/common-licenses ; Debian Free Software Guidelines. Original MasterLinux text.