The MIT Licence
If you've looked at open-source projects for any length of time, you've probably seen the MIT Licence.
It is short, permissive and, compared with some licences, reasonably easy to get your head around.
What does it mean in normal English?
Very roughly: you can use my code, change it, give it to other people and even use it in commercial or closed-source software, but keep the copyright and licence notice.
That sentence is here to help you understand the idea. It is not a replacement for the actual licence text.
What can somebody do with MIT-licensed code?
The licence gives permission to use, copy, modify, merge, publish, distribute, sublicense and sell copies of the software.
So yes, somebody can take an MIT-licensed library and use it in a program they sell. They can also use it in a closed-source program.
Do they have to publish their changes?
No. MIT is not a copyleft licence.
If somebody changes your MIT-licensed code, the MIT Licence does not generally require them to publish those changes. It also does not require the rest of their program to become open source.
This is one of the big differences between something like MIT and something like the GPL.
What do they have to keep?
The copyright notice and permission notice must be included in copies or substantial portions of the software.
That is why software using MIT-licensed libraries will often include their licence text somewhere in its documentation, licences directory or third-party notices.
Can I sell my own MIT-licensed software?
Yes.
Open source does not mean "you aren't allowed to charge money". You can sell MIT-licensed software. Other people can also make commercial use of it under the licence terms.
What about patents?
The MIT Licence does not spell out an explicit patent grant in the way Apache License 2.0 does.
If patents are an important concern for your project, compare the licences carefully rather than assuming all permissive licences are interchangeable.
What about warranty?
The MIT Licence says the software is provided "as is" and includes a warranty and liability disclaimer.
Basically, publishing software under MIT is not a promise that it is flawless, suitable for every possible purpose or incapable of doing something spectacularly unhelpful.
An example
Let's say you make a Python library and release it under MIT.
A company finds it, modifies part of it and includes it in a paid, closed-source application. MIT can allow that. They do not have to publish their entire application just because your library is inside it, but they still need to comply with the MIT Licence and keep the required notice.
Why might I choose MIT?
MIT is worth considering if your main aim is to let people reuse your code very freely and you are happy for that code to appear in proprietary software.
If your reaction to the example above is "hang on, I want improvements to stay open", then have a look at the copyleft licences instead.
One last thing
Don't copy the paragraph at the top of this page into a LICENSE file! Use the real licence text.
Image Description