This notes is about explaining the relationship between GNU, linux, unix, mac etc

First, Unix is basically an operating system developed by dennis ritche and others in 1960.

Before diving into linux, lets understand how linux came into existence.

Originally when unix was founded it was free to use by anyone, meaning anyone can use it as their OS, but in late 70's it was transferred to propertiery licensed software, meaning you need to pay some amount in order to use their software(OS). This became an headache in developer community, this is the point where GNU came into existence.

What is GNU?

A person called Richard Stallman, came with an idea on developing an open source OS with unix like, around 1980's he introduced GNU to public which is totally free to use and also unix like.

The problem with GNU was it struggled alot with kernel, GNU initially was developed or rewrote unix stuffs like GCC(c compiler), shell(bash), commands like ls, awk, sed, etc. but it lacked the kernel, there was a kernel called GNU Hurd, but it was so slow and struggled alot compared with unix.

Linux birth

This is where linux torvalds(GOAT of modern programming), came up with stuff called linux, which is a completely open source unix like kernel, where anyone can use GNU + linux to develop a fully open source Operating system.

Many of you have heard terms like linux distros, linux os etc. all these are nothing but a fully functional operating system based on linux kernel and coreutils like GNUalong with some modern GUI's.

This is the main differentiation between GNU, linux and unix.

BSD, Mac, DE and other stuffs.

Before diving into this, we need to understand two different type of licenses here. BSD -> BSD based licenses are free to use, modify the code, but it dont have to be neccesarily open source on the downstream system. EG: lets say there is an OS called X with BSD license. Now i as a developer forking/cloning that repo code(X) and doing some modifications/improvements and creating a new OS called Y, now as an individual i can close source this OS Y and i can also able to commercialize it. GPL -> GPL(General Public License) are also similar to BSD license, where one can use, modify the code and even commercialize it, but it cannot be private/close sourced. EG: Consider the same above example, the only difference is i cannot private/close source OS Y.

BSD -> BSD is nothing but a kernel based on complete unix, meaning its unix certified! even though linux, GNU are unix like(but these are not unix certified). FreeBSD -> FreeBSD is a fully functional BSD license open source Operating System. Mac -> Mac is a fork of BSD kernel with some improvements(Now you can align with, why Mac choses BSD instead of linux, since mac chosen BSD they are able to commercialize macos, ios, watchos etc with private/close source repo)

DE -> DE is Desktop Environment, as you can see above every os's has only two stuff kernel + coreutils(command line, shell, commands etc), linux + GNU, FreeBSD, Unix all. Now in order to support GUI, meaning graphically accessing stuffs, for these things DE is used, some of the DE's are Gnome, mate etc. For Eg: ubuntu OS contains linux(kernel) + GNU(coreutils) + Gnome(DE). Similarly FreeBSD comes with kernel and coreutils, but not DE, may be you can create a new distro something like ManiBSD with freeBSD kernel + coreutils + DE(Gnome or mate or anything)

To summarize: Unix -> Initialy developed as an open source Operating system, it has kernel, coreutils, shell etc, but later transfered to closed source. Linux -> Is a kernel, it can be combined with GNU(coreutils) to form a complete OS. GNU -> Core utils with unix like. BSD -> unix based kernel. FreeBSD -> A complete OS based on BSD(unix).

All the above information are just a high level understanding or definition of stuffs. If you want to deep dive, always visit the official documentation for indepth learnings.