OSS Wiki LogoOSS Wiki
Get Started

Understanding Open Source Licenses

Learn about common open source licenses, their implications, and how to choose or respect them when contributing.

Understanding Open Source Licenses

Open source licenses define how code can be used, modified, and distributed. Understanding licenses is essential for contributors and maintainers alike to avoid legal or ethical issues.


1. Why Licenses Matter

  • Legally protects the author and contributors.
  • Defines permissions for use, modification, and redistribution.
  • Ensures open collaboration while respecting authors’ rights.
  • Some licenses require sharing improvements (copyleft), while others are permissive.

2. Common Open Source Licenses

2.1 MIT License

  • Type: Permissive
  • Allows: Use, copy, modify, merge, publish, distribute, sublicense
  • Requires: Include the original license notice
  • Example projects: React, Vue.js

2.2 Apache 2.0 License

  • Type: Permissive with patent grant
  • Allows: Similar to MIT, plus patent rights
  • Requires: Include license and NOTICE file
  • Example projects: Apache Kafka, Android Open Source

2.3 GPL (General Public License)

  • Type: Copyleft
  • Requires: Any derivative work must be licensed under GPL
  • Version: GPLv2, GPLv3
  • Example projects: Linux kernel, GIMP

2.4 Other Licenses

  • BSD 2-Clause / 3-Clause → permissive, minimal requirements
  • Creative Commons → mainly for content and documentation
  • LGPL → less strict copyleft for libraries

3. How to Respect Licenses as a Contributor

  • Always check the repo’s license before contributing.
  • Include license headers if required by the project.
  • Don’t relicense someone else’s work without permission.
  • For code reuse, follow license requirements (e.g., attribution, copyleft rules).

4. Choosing a License for Your Project

  • Decide based on your goals:
    • Permissive (MIT, Apache) → allow wide adoption
    • Copyleft (GPL) → ensure derivatives remain open source
  • Consider compatibility with dependencies.
  • Clearly add LICENSE file in the repo root.

5. Tools to Check and Manage Licenses

  • ChooseALicense.com, Licenseinator → helps pick a license.
  • license-checker (npm) → detect dependencies’ licenses.
  • GitHub repository settings → display license badge.

6. Summary

  • Licenses are legal rules for open source projects.
  • Permissive licenses allow flexibility; copyleft ensures derivatives remain open.
  • Always read, respect, and include licenses in contributions.

Contributors