What Is a GPL License and How Does It Work?

The GNU General Public License (GPL) is one of the most widely used software licenses in the world — and also one of the most misunderstood. If you've ever downloaded open-source software, used Linux, or worked with WordPress, you've already encountered it. Understanding what the GPL actually means helps you use, share, and build software without accidentally crossing legal lines.

The Core Idea Behind the GPL

The GPL was created by Richard Stallman in 1989 under the GNU Project. Its fundamental purpose is to keep software free — not free as in no cost, but free as in freedom. The license guarantees users four specific freedoms:

  • Run the software for any purpose
  • Study how the software works (requires access to source code)
  • Redistribute copies
  • Modify the software and release those modifications

The catch — and it's an important one — is the copyleft clause. Any software you distribute that incorporates GPL-licensed code must itself be released under the GPL. You can't take GPL code, modify it, and then lock it up in a proprietary product. The license "travels" with the code.

GPL vs. Other Open-Source Licenses

Not all open-source licenses work the same way. The GPL sits on one end of a spectrum. 🔍

LicenseCopyleftCommercial UseCan Mix with Proprietary Code
GPL v2/v3StrongYesNo
LGPLWeak/LimitedYesYes (with conditions)
MITNoneYesYes
Apache 2.0NoneYesYes
AGPLStrong + NetworkYesNo

MIT and Apache licenses are considered "permissive" — you can use the code in closed-source projects with minimal restrictions. The GPL is the opposite: it's "viral" by design. This isn't a bug; it's deliberate. The goal is to ensure that improvements to free software stay free.

GPL Version Differences: v2 vs. v3

There are two major active versions of the GPL.

GPL version 2 (1991) is still common and is the license used by the Linux kernel. It addresses the basics: source code must be available, modifications must stay GPL.

GPL version 3 (2007) added protections against two specific problems:

  • Tivoization — hardware manufacturers were shipping GPL software on devices that technically provided source code but used digital locks to prevent users from actually running modified versions. GPLv3 prohibits this.
  • Patent retaliation — GPLv3 includes a clause that revokes your license rights if you sue other users of the software over patents.

Many projects explicitly specify "GPL v2 only" or "GPL v2 or later" — this distinction matters if you're building on top of existing code.

What the GPL Means for Developers

If you're writing software and want to use GPL-licensed libraries or code, your distribution obligations depend heavily on what you're doing with it.

Key questions that change your obligations:

  • Are you distributing the software, or just running it internally?
  • Is the GPL code linked directly into your software, or just called as a separate process?
  • Are you using GPL or LGPL (the Lesser GPL, which allows linking with non-GPL code)?

The GPL only triggers obligations when you distribute the software to others. If you modify GPL code and run it entirely on your own servers without giving it to anyone, you're generally not required to release your modifications — though the Affero GPL (AGPL) closes this specific loophole by covering software delivered over a network.

What the GPL Means for Users 🛠️

If you're using GPL-licensed software — whether it's an app, a tool, or a plugin — your rights are strong. You're entitled to:

  • Receive or request the source code
  • Modify the software for your own use
  • Share copies (as long as you also share the source)

This is why companies like Red Hat can build commercial products on Linux — they sell support, services, and convenience, not the software itself. The license permits commerce; it just prevents proprietarization.

Common GPL Use Cases in the Wild

Some of the most significant software in computing runs under the GPL:

  • Linux kernel — GPL v2
  • WordPress — GPL v2 or later (which is why all WordPress themes and plugins distributed publicly must also be GPL)
  • GCC (GNU Compiler Collection) — GPL v3
  • VLC Media Player — GPL v2

The WordPress case is particularly instructive for web developers. Because WordPress core is GPL, any theme or plugin you distribute publicly is considered a derivative work and inherits the GPL. This affects how you can sell or license your own WordPress products.

Variables That Determine What the GPL Means for Your Situation

How the GPL applies to your specific project depends on several intersecting factors:

  • How you're using the code — running internally vs. distributing externally
  • How the GPL code is integrated — statically linked, dynamically linked, or loosely coupled
  • Which version of the GPL applies to the code you're using
  • Your jurisdiction — copyright law varies internationally, and GPL enforcement has played out differently in different courts
  • Whether you're a solo developer, a company, or an open-source contributor — obligations and risks scale differently

The GPL is clear in principle but genuinely complex in application. Two developers using the same library in superficially similar ways can face meaningfully different obligations depending on their architecture, distribution method, and business model. Understanding the license text is a starting point — but how it applies to your specific codebase and workflow is where the real judgment calls live.