Strong copyleft

GNU General Public License v2.0

A strong copyleft from 1991 used by the Linux kernel and Git. When used as "only", it is incompatible with GPL-3.0 and Apache-2.0.

SPDXGPL-2.0-onlyGPL-2.0-or-later

Permissions, conditions and limitations at a glance

Permissions

  • Commercial useThe software and derivatives may be used for commercial purposes.
  • ModificationThe software may be modified.
  • DistributionThe software may be distributed.
  • Private useThe software may be used and modified privately without publishing it.

Conditions

  • License and copyright noticeA copy of the license and the copyright notice must be included when distributing.
  • State changesChanges made to the original must be indicated.
  • Disclose sourceSource code must be made available when distributing.
  • Same licenseModifications and derivatives must be distributed under the same (or a compatible) license.

Limitations

  • LiabilityExpressly states that there is no liability for damages.
  • WarrantyExpressly states that no warranty is provided.

Permissions, conditions and limitations are classified using data from choosealicense.com (GitHub, MIT License).

What kind of license is it?

GPL-2.0 is the second version of the GPL, published by the FSF in June 1991. Its copyleft principle is the same as GPL-3.0: if you distribute a program that includes or is combined with this code, you must provide the whole under GPL-2.0 with its source. Notable examples are the Linux kernel (GPL-2.0-only, with a syscall exception on some headers), Git (GPL-2.0-only) and WordPress (GPL-2.0-or-later).

only vs or-later

Projects using GPL-2.0 usually pick one of two options.

Section 9 of the text states that if a program does not specify a version number, any version ever published by the FSF may be chosen. That is why it matters to state clearly which applies in file headers or SPDX identifiers (guide).

What you must do when distributing

Common misconceptions

How to apply it

Keep the text unchanged in LICENSE or COPYING and attach the official notice to each file. Keeping the sentence "either version 2 of the License, or (at your option) any later version" in the notice makes it or-later; removing it makes it only. Use the SPDX identifier GPL-2.0-only / GPL-2.0-or-later.

When it fits

It is needed for projects that exchange code with the GPL-2.0-only ecosystem, such as Linux kernel modules. If a new project aims for strong copyleft, GPL-3.0, with its improved patent clause and compatibility, or "GPL-2.0-or-later" is more flexible.

Can GPL-2.0 code go into another project?

General verdicts for taking code released under this license and distributing it combined into a project under each license below. See other combinations in the compatibility checker →

Target projectVerdictNotes
Proprietary (closed-source) software Not allowedThe entire combined program would have to be released with source under the same GNU license, so it cannot be included while keeping the project's license.
MIT Not allowedThe entire combined program would have to be released with source under the same GNU license, so it cannot be included while keeping the project's license.
Apache-2.0 Not allowedThe entire combined program would have to be released with source under the same GNU license, so it cannot be included while keeping the project's license.
MPL-2.0 Not allowedThe entire combined program would have to be released with source under the same GNU license, so it cannot be included while keeping the project's license.
LGPL-2.1 Allowed with conditionsBecause LGPL-2.1 permits conversion to the GPL, this is allowed only if the combined work is distributed under GPL-2.0-only.
LGPL-3.0 Not allowedGPL-2.0-only code is incompatible with the additional terms of GPL-3.0, LGPL-3.0 and AGPL-3.0.
GPL-3.0 Not allowedGPL-2.0-only code is incompatible with the additional terms of GPL-3.0, LGPL-3.0 and AGPL-3.0.
AGPL-3.0 Not allowedGPL-2.0-only code is incompatible with the additional terms of GPL-3.0, LGPL-3.0 and AGPL-3.0.

The content on this site is general information, not legal advice. For actual distribution, contracts or disputes, consult a lawyer or other qualified professional.