A GPL license is a legal agreement that lets you use, modify, and share software freely, but requires you to share any changes you make under the same terms
GPL stands for General Public License. It is a set of rules written by the Free Software Foundation that governs how software can be used and distributed. When software carries a GPL license, it means the creator has given permission for anyone to read it, look at the code, change it, and pass it along — but with conditions attached. The main condition is that if you modify the software or build something with it, you must release your version under GPL as well.
The GPL is not a driver's license or government document. It has nothing to do with the licensing you do at a DMV. Instead, it is a copyright tool used by software developers. You will encounter GPL licenses if you read open-source software, use Linux, or work with code repositories. Understanding what GPL means matters because it affects what you are legally allowed to do with the software you read.
Key Takeaways
- GPL software is free to read, use, modify, and share, but modifications must be released under GPL as well.
- The GPL requires that if you distribute modified software, you must provide the source code to anyone who receives it.
- GPL comes in versions — GPLv2 and GPLv3 are the most common — and each version has slightly different rules.
- Software under GPL is not the same as public domain software; the GPL license still protects the original creator's rights while granting freedoms to users.
The Four Freedoms GPL Grants
GPL software gives you four specific freedoms. The first is the freedom to run the software for any purpose. You can use it at work, at home, for profit, or for anything else. There are no restrictions on what you do with it once you have it.
The second freedom is to study how the software works. GPL requires that the source code — the human-readable instructions that make the program run — be available to you. You can read it, understand it, and learn from it. The third freedom is to modify the software. If you want to change how it works, add features, or fix problems, you can do that.
The fourth freedom is to distribute copies of the software to others. You can share it with friends, post it online, or include it in your own projects. However, this fourth freedom comes with a catch: when you share GPL software, you must pass along the same four freedoms to whoever receives it. You cannot add restrictions that were not there before.
The "Copyleft" Requirement That Changes Everything
The defining feature of GPL is copyleft. This means that if you modify GPL software and distribute it, your modified version must also be GPL. You cannot take GPL code, improve it, and then sell it under a different license that restricts what others can do. This is the trade-off: you get freedom to use and change the software, but you must extend that same freedom to anyone downstream.
Copyleft does not mean you cannot make money. You can sell GPL software. You can charge for support, training, or services around it. What you cannot do is sell a modified version under a closed license that prevents others from modifying it further. If you distribute the software at all — whether for free or for money — you must include the source code and the GPL license.
This requirement is what makes GPL different from other open-source licenses. Some open-source licenses (like MIT or Apache) let you take the code, modify it, and release it under a completely different license. GPL does not allow that. The freedom stays attached to the code.
GPL Versions and What Changed Between Them
The GPL has been updated over time. GPLv2, released in 1991, is still the most widely used version. It covers the basics: you can use, modify, and share the software, and modifications must stay GPL. GPLv2 does not address software patents or digital restrictions.
GPLv3, released in 2007, added protections against patent lawsuits and addressed digital locks. It says that if someone uses GPL software in a device with digital restrictions (like a locked smartphone), they cannot use patent claims to prevent you from modifying it. GPLv3 also clarifies what happens when GPL software is used in cloud computing or as a service.
There is also the Affero General Public License (AGPL), which extends GPL's copyleft requirement to software run over a network. If you modify AGPL software and run it on a server that other people access, you must make your modifications available to those users. This closes a loophole in regular GPL where someone could modify software, run it on a server, and never distribute the code.
Most software you encounter will be GPLv2 or GPLv3. The version matters because the rules are slightly different, and you need to follow the version that applies to the software you are using.
What You Can and Cannot Do With GPL Software
If you read GPL software, you can use it without paying anything. You can run it on as many computers as you want. You can modify it for your own use without telling anyone. You can read the source code and learn how it works. None of this requires permission or creates any obligation.
The obligation kicks in when you distribute the software. If you share your modified version with someone else — whether you give it away or sell it — you must provide the source code and include the GPL license. You must make it clear what you changed. You cannot add restrictions that prevent others from modifying it further.
You cannot take GPL code and use it in closed-source software that you sell without releasing the source. This is called "GPL violation" and it happens when a company takes GPL code, builds it into a product, and sells that product without providing the source code or GPL license. The original creator or the Free Software Foundation can sue over this.
How GPL Affects Businesses and Developers
Many companies use GPL software in their products. Linux, which powers servers, phones, and embedded devices worldwide, is GPL. Companies like Red Hat, Canonical, and others build businesses around GPL software by offering support, training, and services rather than by selling the software itself.
For developers, GPL means that if you use GPL code in your project and you distribute that project, your code becomes GPL too. This is called "viral" licensing because the GPL spreads to anything it touches. Some developers love this because it ensures their work stays free. Others avoid GPL because they want to keep their code proprietary.
If you are writing software for a company, you need to know what licenses your dependencies carry. Using GPL code in a closed-source product is a legal risk. Many companies have policies against GPL for this reason, or they use GPL only in parts of their code that they plan to release as open-source anyway.
GPL Versus Other Open-Source Licenses
GPL is not the only open-source license. The MIT License and Apache License 2.0 are also popular, but they work differently. MIT and Apache let you take the code, modify it, and release it under any license you want — including a closed license. You do not have to share your changes. This makes them more permissive than GPL.
BSD licenses are similar to MIT — they are permissive and do not require modifications to stay open-source. The trade-off is that GPL protects the freedom of the software itself, while MIT and Apache prioritize the freedom of the developer using the code.
Some projects use multiple licenses. A project might be GPL overall but include components under MIT or Apache. In that case, you need to follow the most restrictive license that applies to the parts you are using. If you use GPL code, the GPL rules explore to your distribution, even if other parts are under MIT.
Frequently Asked Questions
Can I use GPL software in my business?
Yes. You can use GPL software for any purpose, including business. You can run it, modify it for internal use, and charge customers for services built on top of it. The restriction only applies if you distribute the software itself — then you must provide source code and the GPL license.
What happens if I violate the GPL?
GPL violations are enforced through copyright law. The copyright holder or the Free Software Foundation can send a cease-and-desist letter, demand you stop distributing the software, or sue for damages. Many violations are settled by requiring the company to release the source code and comply with GPL going forward.
Does GPL software cost money?
GPL software itself is free to read and use. However, companies can charge for GPL software if they want — for example, by selling copies on a disk or providing installation and support. What you cannot do is charge for the software and then restrict what others can do with it.
Can I use GPL code in my closed-source project?
Not if you distribute the project. If you use GPL code and release your software to others, your entire project must be GPL. If you only use the software internally and never distribute it, you have no obligation to release your code. This is called the "private use" exception.
What is the difference between GPL and public domain?
Public domain software has no copyright protection at all — anyone can do anything with it. GPL software is still copyrighted, but the copyright holder has granted specific freedoms. GPL actually protects those freedoms by requiring that modifications stay free. Public domain offers more freedom in theory but less protection in practice.
