What Is Open Source Software? Code Anyone Can Read, Change and Share
By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.
Most of the software that runs the world can be read by anyone. The Linux operating system inside almost every server, phone and router, the web servers that deliver most websites, the programming languages, databases and libraries that developers build on, are open source: their source code is published, and a licence permits anyone to use it, change it and redistribute the result. It is one of the largest cooperative efforts in human history, and it began with a printer.
Source code and the printer
Software is written by people as source code, readable text, and converted into the machine instructions a computer actually runs. A company that sells software usually ships only the machine instructions and keeps the source code secret, so customers can run the program but cannot see how it works or change it. That is proprietary software, and until the 1970s it was unusual; early computer code was routinely shared among researchers.
In 1980 Richard Stallman, a programmer at MIT, wanted to modify the software for a jammed laboratory printer and was refused the source code by its manufacturer. He concluded that secret code made users dependent and helpless, and in 1983 he announced the GNU project, an effort to write a complete operating system that anyone would be free to study and change. He called it free software, meaning free as in freedom rather than free of charge, and wrote the licence that would enforce it.
The licence is the invention
What makes software open source is not that its code is visible but that its licence grants rights. Stallman's General Public License, or GPL, allows anyone to use, copy, modify and distribute the code, on one condition: anything distributed that is built from it must be released under the same terms. That copyleft clause, using copyright to guarantee openness rather than restrict it, means that GPL code cannot be taken private. The Linux kernel, written by Linus Torvalds from 1991, uses it, which is why every company that ships Linux must publish its changes.
A second family of licences asks less. The MIT and BSD licences and Apache's let anyone do anything with the code, including using it inside proprietary products, as long as the original authors are credited. Most of the web's building blocks use these permissive licences, which is why the software inside an iPhone includes code from BSD Unix and why Google could build Android on Linux but keep parts of it closed. The term open source itself was coined in 1998 by a group who felt free software sounded hostile to business and wanted to sell the practical benefits rather than the ethics. The two camps still argue, and use each other's code.
How it gets written
Open source projects are run in public. The code lives in a shared repository, today usually on a site such as GitHub, where anyone can read it, report a bug, or propose a change, called a pull request, which the project's maintainers review and accept or reject. Large projects have hundreds or thousands of contributors; the Linux kernel accepts around ten thousand changes from more than a thousand people every release, and its rules for who may approve what are strict and long established.
Who does the work has changed. In the early years it was mostly volunteers. Now the majority of contributions to the biggest projects come from people paid by companies, Intel, Google, Microsoft, Red Hat and others, who need the software to work well and find it cheaper to improve a shared version than to build their own. Beneath the giants sits a long tail of small libraries maintained by one or two unpaid people, on which enormous systems quietly depend.
How it makes money
Giving software away turned out to be compatible with several businesses. Red Hat, bought by IBM for 34 billion dollars in 2019, sells support, certification and guarantees for Linux that companies pay for even though the code is free. Cloud providers charge for running open source databases and tools on their machines. Many companies release a core product as open source and sell extra features, hosting or an enterprise edition around it. And the largest technology firms treat open source as infrastructure: it costs them less to share the foundations and compete on what they build above them.
The model has strains. A cloud provider can host a small company's open source database and capture the revenue, which has pushed several projects to adopt licences that forbid exactly that, moving them out of open source as usually defined. And the small libraries that everything depends on are often maintained by one exhausted person, a fragility exposed in 2014 when a bug in OpenSSL, the encryption library used by two thirds of the web and maintained by a handful of volunteers, left much of the internet insecure. The main rights and obligations, by licence type:
- •Copyleft (GPL): use, change and share freely, but share derived works under the same licence
- •Permissive (MIT, BSD, Apache): use, change and share freely, including inside closed products, with credit
- •Source-available: code is visible but some uses, often competing cloud services, are forbidden; not open source
- •Proprietary: code is secret and use is licensed on the vendor's terms
Why it won
Open source did not win because it was free of charge, though that helped it spread. It won because software that many people can inspect and fix tends to become more reliable and more secure than software that few can, because developers prefer to build on foundations that cannot be taken away from them, and because sharing the boring parts lets everyone concentrate on the interesting ones. The result is that a person setting up a website today can assemble, at no cost, a stack of software that would have cost a fortune and years of work in 1995, and that the same code runs on a hobbyist's laptop and in the largest data centres in the world.
The takeaway
Open source software is code published with a licence that lets anyone use, study, modify and redistribute it, either on condition that derived works stay open, under copyleft licences like the GPL, or with almost no conditions under permissive ones. Begun as an ethical movement in the 1980s and adopted by industry as infrastructure, it now underlies most of the internet and is paid for through support, hosting and the companies that depend on it.