After a while, the legal restrictions posed on AT&T subsided, and it started to "smell money" and believe it can do better selling UNIX commercially. It created the AT&T System V's system, touted it was better than AT&T UNIX and the BSDs, and sold it to vendors. System V was sold under a very restrictive license, that forced them to hold the source code for themselves. Even cooperation between two different vendors was not allowed.
Gradually, vendors licensed the System V source code and ported it to their own architectures. This caused an explosion of proprietary UNIX systems. What Sun Microsystems initially did was actually take the BSD source code, diverge from it and distribute it without full access to the code. (something that was allowed by its license). A similar thing happened with other software distributed under similar licenses.
To answer this threat, a new phenomenon sprang into existence: the "free software" movement, the GNU project and the copyleft licenses, all led by one dynamic personality: Richard M. Stallman.
Richard Stallman (aka RMS) published the GNU Manifesto in 1984, which coined the term "free software", and explained the rationale behind it. The Manifesto was also a creed for the the GNU project which aimed to be a complete UNIX-compatible replacement for UNIX systems, while being completely original work. The software of the GNU project was released as free software, under the terms of the GNU General Public License (or GPL for short).
Gradually, the GNU project created more and more C code to replace the UNIX and BSD utilities. It was already installable and usable on various flavours of UNIX, and became a fully independent system once the Linux kernel was written.
The GPL license is a free software license that has many fine points. The most important concepts in it are:
1. Copyleft - making sure that derived work that are distributed to the outside includes the source and is distributed under the same license. Note that this does not apply to modifications done for internal or private use.
2. Restrictive Integration by Other Code bases - GPL code can only be linked against code with free software licenses that match some criteria. This property has been recently referred to as "viral".
The incentive to restrict a software this way rather than following the traditional virtually public domain BSD license, was to make sure that the core GNU system would always remain free as well.