What are the main Open Source licenses and how do they differ?
Open-source licenses differ mainly in their "copyleft" strength: GPL is strongly copyleft (derivatives must stay GPL), LGPL/Apache are permissive (you can build proprietary software on top), and Creative Commons is a family used for content rather than code.
The key axis is copyleft — how hard the license works to keep downstream code free. Strong copyleft is "sticky": it spreads its own terms to anything that links it. Permissive licenses don't, which is why companies happily embed them in closed products.
| License | Copyleft | Commercial use | What happens to your modifications |
|---|---|---|---|
| GPL | Strong | Allowed | Must also be released under the GPL |
| LGPL / Apache | Weak / none | Allowed | May stay proprietary |
| Creative Commons | Varies | Depends on suffix | Depends on suffix |
- GPL is the "viral" one in the best sense: link GPL code and your code must become GPL too. This guarantees the freedom propagates, but it's exactly why GPL code can't be baked into closed-source products.
- LGPL / Apache are the pragmatic choice for libraries — a permissive library can be used by both free and proprietary apps, maximising adoption.
- Creative Commons is for creative works (text, images, media), not software, and is configured with suffixes:
nc= non-commercial only,nd= no derivatives,sa= share-alike (the copyleft-style clause).
Tip: Always read the license before pulling open-source code into a commercial project — "open source" does not automatically mean "free to embed in closed software." Picking the wrong dependency can legally force you to open your own code.