Open source licenses can seem confusing, but understanding them is crucial for both using and creating open source software. Let's demystify the most common licenses.
Permissive vs. Copyleft
The fundamental distinction is between permissive licenses (MIT, BSD, Apache) and copyleft licenses (GPL, AGPL). Permissive licenses allow almost any use, including in proprietary software. Copyleft licenses require derivative works to also be open source.
Popular Licenses
**MIT License**: Simple and permissive. Allows commercial use with minimal restrictions. Popular for libraries and frameworks.
**GPL (General Public License)**: Strong copyleft. Ensures software remains free and open. Used by Linux, GIMP, and many others.
**Apache 2.0**: Permissive with patent protection. Popular for enterprise software.
**AGPL**: Like GPL but closes the "SaaS loophole." If you run AGPL software as a service, you must share modifications.
Choosing a License
Consider your goals:
- Want maximum adoption? Use MIT or Apache.
- Want to ensure software stays open? Use GPL.
- Building a library? Consider MIT or Apache.
- Creating a web service? Consider AGPL.
Compatibility Matters
Not all licenses work together. GPL code can't be mixed with some permissive licenses. Understanding compatibility prevents legal issues.
Dual Licensing
Some projects offer multiple licenses. They might be GPL for open source use but offer commercial licenses for proprietary software. This funds development while maintaining openness.
Corporate Concerns
Many companies worry about GPL "contamination." These fears are often overblown. Using GPL software doesn't automatically make your code GPL. Linking and derivative work definitions vary by jurisdiction.
Getting Legal Advice
When in doubt, consult a lawyer familiar with open source. The stakes are too high for guesswork, especially in commercial contexts.