Linux is "inspired" by Unix, but is entirely original code from the ground up. MacOS (OS-X) came from NextOS that was built from BSD, a UNIX distro. Though these days, I doubt much BSD code remains in MacOS. The GUI was "inspired" by the Xerox Alto/Star - which was not UNIX.