macOS is based on Unix; Linux is Unix-like [1]. Neither macOS nor OS X are based on Linux.
> It is a Unix-based operating system
> macOS makes use of the BSD codebase and the XNU kernel,[14] and its core set of components is based upon Apple's open source Darwin operating system.
MacOS and before it Mac OS X do not have “Linux” roots. The operating systems are based on Darwin which has roots in FreeBSD (which is emphatically not Linux).
You could say it has Unix roots or BSD roots, although they have diverged significantly. MacOS for example runs on a Mach micro kernel rather than the monolithic kernel you’d find in a Linux or BSD distribution.
As far as the user land goes MacOS does ship a full BSD shell environment and not a GNU/Linux one.