Richard Stallman announced that he was working on a Unix clone on September 27, 1983. [1] This was the GNU Project from GNU's Not Unix.
Stallman was a prodigious programmer and wrote GCC (GNU C), a debugger and Emacs. He also created the GPL and founded the Free Software Foundation (from which the "open source" movement split off).
GNU was most of an OS by 1990 but didn't have a proper kernel (which was intended to be the ambitious Hurd).
In an unrelated move, Linus Torvalds used Stallman's tools to write a mini-OS and released it under Stallman's license in 1991. It naturally got incorporated into what some people (including Stallman) then called GNU/Linux. It was, in code terms, roughly 97% GNU and 3% Linux.
The naming is arguable because Linux was never a GNU or FSF development. However, Stallman's GPL allowed Linux operating system packagers (eg Debian) to use things that had been developed by or adapted for GNU.
Otherwise, Stallman told me he wouldn't have bothered with GNU if he'd known that BSD Unix was going to be available as free software. Unfortunately, FreeBSD wasn't released until 1993.
UNIX is an open standard with a certification program, and Linux certainly tries to follow the standard.
The only real reason that a Linux distribution hasn't been UNIX-certified is because RedHat and IBM found there was very little marketing value in calling it UNIX, that is, Linux is a stronger brand.
And I suspect the only reason MacOS is UNIX-certified is because they advertised it as "UNIX" and were sued by The Open Group, who owns the trademark. [1]