There are two choices while writing on this topic, to write a detailed (and accurate) or to write a concise (but avoid all details) post, I preferred latter and have added appropriate links to dig further.

  1. To whom is this meant for?
    • Anyone who (wish to) use free and/or open-source code as a building block for software development.
    • Anyone who  (wish to) contribute to free and/or open-source code.
    • Anyone who (wish to) release source-code of their project in public

A few theoretical questions (can be skipped)

  1. What’s free software?
    As defined by Free Software foundation, its a software whose licensing conditions promise following 4 freedoms

    • Freedom 0: freedom to run the program for any purpose.
      Eg. Softwares restricted for educational use hinders this freedom (like those distributed under MicroSoft Academic Alliance)
    • Freedom 1: freedom to study how the program works, and change it to make it do what you wish.
      Eg. Softwares whose licensing terms forbids reverse engineering curtails this freedom
    • Freedom 2: freedom to redistribute copies.
      Eg. softwares (eg. WinXP) whose licensing terms forbids copying of software and using it on multiple systems curtails this freedom.
    • Freedom 3: freedom to improve the program, and release your improvements (and modified versions) to the public.
      Eg. freewares which can be downloaded for free (of cost) but modifying them and then distributing modified copy is violation of license agreement (hence, violating copyright law).
  2. What’s an open-source software?
    Quite literally, it implies that source code of software is available but in tech world, a more stricter definition is used (as defined by OSI here).
    There are minor differences in free and open-source movement, for example, if a modified software does not run on the hardware (due to hardware lock), it is considered as violation of user’s freedom but it is believed that it does not violate the definition of being open-source(referenced above). A detailed article here.
  3. What is FOSS (free and open-source software)?
    Though open-source software is a subset of free software, the word FOSS (which is identical to Free) is used to refer to software which is both free and open-source. So, from a developer’s perspective it is same as Free software.
  4. But I thought free software has zero price?
    Zero price is not central to philosophy of free software, its just the outcome of Freedom 2 and economics of demand-supply.
    It must be noted that there are zero price softwares which does not adhere to above freedom, they are called freeware.
  5. So, free software is more about “freedom” rather than “free (zero-price) stuff”?

Now, the practical part

  1. What are major free software licenses?
    1. GPL
    2. LGPL
    3. Apache
    4. BSD
    5. MIT
    6. Affero GPL
      Full drafts of these can be found here, I will highlight important points below.
  2. What about creative commons?
    Do NOT use creative commons for code licensing.
    Creative commons license is meant for artwork (excluding software code), therefore, it can still apply to images/text/videos which are a part of the software.
    For software code, use one of the above licenses instead.
  3. What about Mozilla Public License (or any other license not in the above list)?
    I might write about them once, I have read them and I understand them.


  1. What is GPL (GNU General Public License)?
    Any software released under GPL implies that

    1. Guarantees all four freedom above (there is a minor issue read next question for that).
    2. Software code will be provided (on request or with the executable) in usable, unobfuscated format.
      (There was an interesting debate on Slashdot about whether providing the right build environment necessary and I personally think answer is yes, since not providing it violates Freedom 3)
    3. A work derived from GPL-licensed work must be licensed again under GPL
      (any “patch work” to original code is derived work, this includes wordpress themes)
      A work which is statically linked to a GPL licensed library will be considered derived work (and hence must be distributed under GPL license)
      A work which is dynamically linked to a GPL licensed library is a grey area, FSF believes its a derived work but Novell lawyer Matt Asay believes its not.
      A work which includes GPL licensed header files (containing only macro definitions and no inline code) is not considered a derived work (as discussed on android-platforms group)
  2. What if the company releases source-code (due to GPL license) and then locks down its hardware from running modified code ?
    This is called TiVoization since a consumer electronics TiVo did this and GPLv3 includes a specific clause which implies that hardware lock (eg. encryption keys/checksum matching) cannot be applied to user products. More details here.
    (industrial products like cardiac pacemaker are exception for safety reasons)
  3. Any other major changes in GPLv3?
    Yes, Microsoft claimed that GNU/Linux violates its patents, further, Microsoft and Novell made a deal with a controversial conclusion that Novell customers are protected from patent infringement by Microsoft (so, all others GNU/Linux users who are not Novell customers are not). GPLv3 prevents such future deals in two ways

    1. It dictates that anyone who distributes GPL v3-licensed code and provides a patent licence to some group of recipients must automatically extend that licence to all recipients.
      (So, non-Novell customers are protected as well).
    2. It includes a stipulation that an entity (read Novell) cannot distribute covered code if the entity enter into a deal with another software distributor that involves your paying that software distributor to not sue your customers (in this case the ‘payment’ would be in the form of an undertaking not to litigate).
  4. What if I originally released my project under GPL and now wish to move to non-GPL license?
    You own right to modify license for “your” code but any patches supplied by any 3rd party are still under GPL, so, you need their permission before releasing their patches as a part of your non-GPL code. Also, the previous version of your code is still available to 3rd parties and they can fork and develop that.


  1. What is LGPL (GNU Lesser General Public License)?
    1. It is more permissive that GNU GPL in the sense that a LGPL licensed library can be dynamically linked to by a non-LGPL(read proprietary) code.
    2. Any derived work must still be released with the clause that “modification and reverse engineer is allowed for personal use and debugging”
      Some people confuse LGPL as library GPL (license for open-sourcing their libraries). This assumption arises from its former name Library GPL. GNU website states that if your library is similar in functionality to other proprietary libraries use LGPL but if your libary offers something unique use GPL.
  2. Can I write GPL code which uses LGPL library?
  3. Can I write GPL code which is derived from LGPL library?

Permissive Licenses

  1. What is BSD license?
    There are various versions of this license. The fundamental crux of all these is “any code released under this license can be used in any manner after providing accreditation to  original author of the code”.
    Contrast this with GPL, no release of source code for the derived work is necessary, no prevention of TiVoization and it is completely silent about the issue of software patents. Due to the permissive nature of this license, BSD based code is heavily used by major companies.
  2. Can a BSD licensed code be used to write proprietary (closed-source) software?
  3. Can a BSD licensed code be used to write GPL licensed software?
    Yes (note that for reverse case, everything has to be distributed under GPL and not BSD)
  4. What is MIT license?
    Same as 2-clause BSD license(FreeBSD license).
  5. What is Apache license?
    (Almost) Same as FreeBSD license except that

    1. Legally more elaborate
    2. explicitly grants patent rights where necessary to operate, modify and distribute the software.
  6. Can an Apache licensed code be mixed with GPL licensed code (are they compatible)?
    Not with GPLv2 but Yes with GPLv3 because of the aforementioned patent clause.
    GPLv2 does not allow any additional restrictions while GPLv3 allows patent retaliation clause.
    (I know its all confusing but that’s how it is) Further reading here


  1. Can you summarize this?
    Use GPL if you wish to restrict use of your work (and thus, ensuring more freedom for users of derived work)
    Use LGPL if you are developing a library which replicates functionalities of a closed-source library.
    Use Apache/BSD/MIT if you wish to allow wider use of your work (but less freedom for users of derived work)
    Apache has distinctive advantage of being more legally explicit than BSD/MIT and patent indemnification clause but as mentioned in the previous question, the same patent clause renders Apache incompatible with GPLv2.
    BSD/MIT have advantage over Apache of being compatible with GPL (BSD/MIT licensed code can be included in GPL licensed project) and also they are easy to comprehend for a software developer (who is not a lawyer).
    Further reading here and here
  2. What is Affero GPL?
    This is useful for remotely executed (read web) applications which interacts with their users over the network and no binaries are ever distributed.
    Let me illustrate that by a simple example,
    Bob releases a web CMS under GPL, John modifies it and uses it for its website, John is under no obligation to release source-code of his website.
    If Bob releases his CMS under Affero GPL then John would have to provide a download button on his website for downloading the source code.
  3. What is dual-licensing (or more generically, multi-licensing)?
    Since all licenses are not compatible with each other, project owners can release their code under multiple-licenses simultaneously, hence, the one who wish to use the code can choose the license as per his/her needs. (for eg. jquery is dual-licensed under MIT and GPL)
  4. What is copyright?
    Creator of a creative work(including artwork and software) has certain rights automatically granted to him/her due creation. These rights include ability to sell his right to someone, sell copies of work (while still retaining rights), allow someone to create derivative work (in lieu of royalty) and impose further restrictions (see next question for an example of this). Further details here. All the licenses mentioned here are copyright licenses.

  5. What is copyleft?
    Copyleft is a category of copyright licenses which allow someone to create derivative work and distribute copies of the work while imposing restrictions on how derivative work can be re-distributed/re-used. Eg. saying that derivative work is allowed and the allowing distribution of derivative work cannot be restricted.
    GPL and LGPL (both described below) are examples of strong and weak “copyleft” licenses, respectively.
    BSD and Apache are examples of non-copyleft free software licenses.
    (The two questions on copyright and copyleft are added in response to suggestion and have been added at the end since I think its easier to explain them in terms of the licenses which have been discussed) More details here


  1. I AM NOT A LAWYER. This blog post is based on my understanding of the (major) open source licenses and might have errors/omissions. In case, you might spot any error/omissions, please mention that in comments and I will correct that.
  2. This is my personal blog. The views expressed on these pages are mine alone and not those of my employer.