Open-source licenses facilitate free and open-source software (FOSS) development. Intellectual property (IP) laws restrict the modification and sharing of creative works. Free and open-source software licenses use these existing legal structures for the inverse purpose of granting freedoms that promote sharing and collaboration. They grant the recipient the rights to use the software, examine the source code, modify it, and distribute the modified software. These licenses target computer software where source code can be necessary to create modifications. They also cover situations where there is no difference between the source code and the executable program distributed to end users. Open-source licenses can cover hardware, infrastructure, drinks, books, and music.
There are two broad categories of open-source licenses, permissive and copyleft. Permissive licenses originate in university software development. They grant the recipient the rights to modify and distribute the software with certain conditions. Permissive licenses usually require attribution to credit the original authors and a disclaimer of warranty. Copyleft licenses have their origins in the free software movement. Copyleft licenses also grant the recipient the rights to modify and distribute the software, and require attribution and disclaim warranties. The difference is that copyleft licenses demand reciprocity. Any derivative works must be distributed with source code and under a copyleft license.
Intellectual property is a legal category that treats works of creativity like physical property. Legal systems give the owner of physical property the right to restrict access to that property how they see fit. IP law allows people to own and therefore control creations like literature and software. The owner of intellectual property can sell it, lease it, gift it, or license it. Multiple types of IP cover software including trademarks, patents, and copyrights.
Most countries, including the United States (US), have created copyright laws in line with the Berne Convention. These laws automatically assign a copyright whenever a creator releases their work in any fixed format. Under US copyright law, the initial creation of software is called the original work. The creator, or their employer, holds the copyright to this original work. They alone are permitted to make copies, release modified versions, distribute copies, perform publicly, or display the work publicly. Under US copyright law, modified versions of the original work are called derivative works. When a creator modifies an existing work, they hold the copyright to their modifications. Unless the original work was in the public domain, a derivative work can only be distributed with the permission of all copyright holders. This poses a problem for collaborative development because each update would require the unanimous consent of every contributor.
In 1980, the US government amended the law to treat software as a literary work. All software released after this point was automatically restricted by IP law. At that time, American activist and programmer Richard Stallman was working as a graduate student at the MIT Computer Science and Artificial Intelligence Laboratory. Stallman witnessed the fragmentation that proprietary software caused, and founded the free software movement. Throughout the 1980s, he started the GNU Project to create a free operating system, wrote essays on software freedom, founded the Free Software Foundation (FSF), and wrote several free software licenses. The FSF's licenses used existing intellectual property laws for the opposite of their intended goal of restriction. Free software explicitly provided freedoms to the recipient.
In 1998, Bruce Perens and Eric S. Raymond founded the Open Source Initiative (OSI). Both were active members of the free software community. At Debian, Perens had written the Debian Free Software Guidelines (DFSG). He used this as the basis for The Open Source Definition. An open-source license is one that complies with this definition, and therefore provides software freedom. Eric S. Raymond was a strong proponent of the name "open source" over free software. He viewed open-source as more appealing to businesses and more reflective of the tangible advantages of FOSS development. One of Raymond's goals was to expand the existing hacker community to include large commercial developers. In The Cathedral and the Bazaar, Raymond compared open-source development to the bazaar, an open-air public market. He argued that aside from free software ethics, open-source development provided advantages that proprietary software could not replicate. Raymond focused heavily on feedback, testing, and bug reports. He contrasted the proprietary model where small pools of secretive workers would carry out this work with the open-source development of Linux where the pool of testers included potentially the entire world. He summarized this strength as "Given enough eyeballs, all bugs are shallow." The OSI succeeded in bringing open-source development to corporate software developers including Sun Microsystems, IBM, Netscape, Mozilla, Apache, Apple Inc., Microsoft, and Nokia. These companies released software under existing open-source licenses and drafted their own licenses to be approved by the OSI.
Open-source licenses are categorized as copyleft or permissive. Copyleft licenses require derivative works to include source code under a copyleft license. Permissive licenses do not, and therefore the code can be used within proprietary software. Copyleft can be further divided into strong and weak for licenses that define derivative works broadly or narrowly.
Licenses focus on copyright law, but code is also covered by software patents. Patents differ in significant ways. They cover claimed ideas, rather than implementations. While copyrights cover a specific implementation, patents cover any implementation of a claim. Patent claims give the holder the right to exclude others from making, using, selling, or importing products based on the idea. It is possible to have a patent on an idea but still be unable to legally implement it if the invention relies on another patented idea. Because patents provide the right to exclude, open-source patent grants can offer permission only from covered patents. They cannot guarantee that a third party has not patented any concepts embodied in the code. The older permissive licenses do not discuss patents directly and offer only implicit patent grants in their offers to use or sell covered software. Newer copyleft licenses and the 2004 Apache License offer explicit patent grants and limited protection from patent litigation. These patent retaliation clauses work by terminating license grants for any party who initiates a patent lawsuit regarding covered software.
Trademarks are the only form of IP not granted by these licenses. Trademarks on FOSS function the same as any trademark. A trademark is a design that identifies the distinct source of a product. Because they distinguish products, the same designs can be used in different fields where there is no risk of confusing the two sources. For example, this is why IBM is a trademark for International Business Machines, which supplies mainframe computing solutions, and the International Brotherhood of Magicians which supplies guidance on stage magic. To give up control of a trademark would result in the loss of that trademark. Therefore no open-source license freely offers use of a trademark.
Permissive licenses, also known as academic licenses, allow recipients to use, modify, and distribute software with no obligation to provide source code. Institutions created these licenses to distribute software to the public. Permissive licenses are usually short, often less than a page of text. They impose few conditions. Most include disclaimers and obligations to credit authors. A few include explicit provisions for patents, trademarks, and other forms of intellectual property.
The University of California, Berkeley created the first open-source license, the Berkeley Software Distribution (BSD) license to permit free usage with no obligations placed on users. The BSD license brought the concept of academic freedom of ideas to software. Early academic software authors had shared code based on implied promises. Berkley made these concepts explicit with clear disclaimers for liability and warranty and several conditions, or clauses, for redistribution. The Massachusetts Institute of Technology (MIT) created a permissive license based on the BSD license. The MIT license clarified the conditions by making them more explicit. For example, the MIT license describes the right to sublicense. One of the strengths of open-source development is the complex process where developers can build on the derivative works of each other and combine their projects into collective works. Explicitly making the license sublicensable provides a legal advantage when tracking the chain of authorship. The BSD and MIT are template licenses that can be adapted to any software. They are widely adapted and used by many open-source projects.
The Apache License is more comprehensive and explicit. The Apache Software Foundation wrote it for their Apache HTTP Server. Version 2, published in 2004, offers legal advantages over simple licenses and provides similar grants. While the BSD and MIT licenses offer an implicit patent grant, the Apache License includes a section on patents. It is one of the few permissive licenses with a patent retaliation clause. Patent retaliation, or patent suspension, clauses take effect if someone initiates patent infringement litigation on software under the license. In that situation, the patent grants are revoked. These clauses protect against patent trolling.
Copyleft licenses use reciprocity to subvert restrictions in IP law. Copyleft originates in the free software movement, science fiction fandom, and the broader counterculture. According to the 1910 Buenos Aires Convention, copyrighted literature needed a reservation of rights, or copyright notice. These were typically a line of text reading "Copyright © All rights reserved." These copyright formalities would be printed on the title page of a book or somewhere on the packaging of other media. In the Discordian satirical but sacred book, the Principia Discordia, Gregory Hill used instead a notice that read, "Ⓚ All rights reversed." The phrase "all rights reversed" entered into the computing and science fiction culture as expressions of resistance to IP law and its restrictions. It was often paired with "copyleft" and playful alternatives to the copyright symbol. Programmer Don Hopkins mailed a manual to Richard Stallman with a "Copyleft Ⓛ" sticker, and Stallman adopted the term to describe the FSF's reciprocal licenses, notably the GNU General Public License (GPL). The FSF popularized the word and associated it specifically with reciprocal free software.
Traditional, proprietary software licenses are written with the goal of increasing profit, but Stallman wrote the GPL to increase the body of available free software. Copyleft licenses offer the rights to use, modify, and distribute the software on the condition that people must release derivative works under a copyleft license offering these freedoms. Software built on a copyleft base must come with the source code. They offer protection against proprietary software consuming open-source code without giving back. Richard Stallman stated that "the central idea of copyleft is to use copyright law, but flip it over to serve the opposite of its usual purpose: instead of a means of privatizing software, [copyright] becomes a means of keeping software free."
Courts have found that distributing copyleft software indicates acceptance of the terms. Physical software releases can acquire the consumer's assent with notices placed on shrinkwrap. Online distribution can use clickwrap, a digital equivalent where the user must click to accept. Copyleft software has an additional acceptance mechanism. Without a license from the copyright holder, the law prohibits redistribution, public displays, and the release of modified versions. Therefore engaging in these actions as allowed by an open-source license is treated as an indication of acceptance of the requirement to provide source code under the appropriate license.
Practical benefits to copyleft licenses have attracted commercial developers. Corporations have used and written copyleft licenses with a narrower scope than the GPL. The GPL remains the most popular license of this type, but there are other significant examples. The FSF has crafted the Lesser General Public License (LGPL) for libraries. Mozilla uses the Mozilla Public License (MPL) for their releases, including Firefox. IBM drafted the Common Public License (CPL) and later adopted the Eclipse Public License (EPL). A difference between the GPL and other copyleft licenses is how they define derivative works covered by the license. The GPL, and the Affero License based on it, use a broad scope to describe affected works. They are called strong copyleft in contrast to the weaker copyleft licenses often used by corporations. Weak copyleft uses narrower, explicit definitions of derivative works. The MPL uses a file-based definition, the CPL/EPL use a module-based definition, and FSF's own LGPL exempts libraries in certain situations.
License compatibility determines how software with different licenses can be distributed together. The goal of open-source licensing is to make the work freely available, but this becomes complicated when working with multiple licenses imposing different requirements. They cover different ground using different terminology. There are many uncommonly used licenses and some projects write their own bespoke licenses. As a result, this causes more confusion than other legal aspects. When releasing a collection of software, each license can be considered separately. However, when attempting to combine software, code from another project can only be in-licensed if the project uses compatible terms and conditions.
When combining software, the original licenses can be maintained for separate components, and the larger work released under a compatible license. Permissive licenses are broadly compatible because they can cover separate parts of a software project. The GPL, LGPL, AGPL, MPL, EPL, and Apache License have all been revised to enhance compatibility. This compatibility is often one-way. Permissive licenses can be used within copyleft works, but copyleft material cannot be released under a permissive license. Some weak copyleft licenses can be used under the GPL and are said to be GPL-compatible. GPL software can only be used under the GPL or AGPL. Public domain software can be used anywhere as there is no copyright claim, but software acquired under any open-source license cannot be waved to the public domain. 
Nearly all free software licenses are also open-source software licenses. The separate terms free software and open-source software reflect different values rather than a technical or legal difference. The founder of the FSF, Richard Stallman, stated that "free software is an ethical imperative" in contrast to the practical aims of open source. The criteria for free and open-source licenses are both similar and related. Bruce Perens based the Open Source Definition on the Debian project's guidelines which were based on Stallman's Free Software Definition.
There are occasional edge cases where either the FSF or the OSI accept a license but not both. For example, only the OSI approved the Open Watcom license. The FSF viewed their Sybase Open Watcom Public License as non-free because it required published source code for private modifications. Situations like this are rare, and all major free software licenses are open-source, including the GPL.
When a copyright expires, the work enters into the public domain. At that point, no one has exclusive rights, and it is freely available to anyone. Additionally, software released before copyright law applied to computer programs was released as public domain. According to attorney Lawrence Rosen, copyright laws were not written with the expectation that creators would release their work into the public domain. Thus intellectual property laws lack clear paths to waive a copyright. Highly permissive licenses described as "public domain" may legally function as unilateral contracts that offer something but impose no terms.
A public-domain-equivalent license, like the Creative Commons CC0, provides a simple waiver of copyright claims into the public domain. Then because there are no standard methods to waive copyrights, they provide an open-source permissive software license as a fallback. In jurisdictions that do not accept a pubic domain waiver, the permissive license takes effect. Public domain waivers share limitations with simple permissive licenses including limited protection against patent or trademark claims. This creates the possibility that an outside party could attempt to control a public domain work via patent or trademark law. Public domain waivers handle warranties differently from any license. Open-source licenses, even very permissive ones, like the MIT license, disclaim warranty and liability. Anyone using the software must accept this disclaimer as a condition. Because public domain software is freely available to anyone, a public domain waiver cannot impose a disclaimer of warranty or liability.
Freeware is software distributed at no cost. FOSS is often given away gratis, but "freeware" commonly refers to proprietary software. Proprietary software licenses do not grant permission to modify and redistribute the software. Proprietary freeware licenses limit redistribution, prohibit commercial usage, and limit installations. Rather than an open-source license that facilitates collaborative development, proprietary freeware often comes with an end-user license agreement that prohibits users from developing the software. Freeware is part of the business model of major proprietary software vendors. For example, in 2014, Microsoft was the world's largest supplier of freeware. Source-available software is a marketing term for proprietary freeware that comes with source code as a reference and not as a basis for derivative works.