Mac OS X is a commercial operating system based on UNIX that is developed and distributed by Apple for use exclusively on its own hardware. Mac OS X borrows heavily from BSDs but comes with its own user interface. In many ways, Mac OS X is very similar to Linux but is also very different from it.
Many Linux commands work in Mac OS X as well. It is also possible to install certain commands if they are not present in Mac OS X by default. Mac OS X also ships with many popular UNIX server programs which can be configured to work more or less similar to that of Linux or UNIX like operating systems.
OS X differs from Linux in the user interface. It uses an interface known as Cocoa from the programming perspective, or Aqua from the user’s point of view. It comes with features that are more or less similar to X and other Linux desktop environments. Cocoa is not compatible with X from the programming perspective and so applications developed for OS X will not run directly on Linux. Porting them to the Linux platform is a major project in itself. Due to this reason, very few native OS X applications make it to the Linux platform.
OS X comes with an implementation of X which runs under Aqua. Due to this reason, it is relatively easy to port GUI Linux and UNIX applications to OS X. However, the resulting ports may not exactly conform to the Aqua UI. Some of the buttons, menus and other features may look out of the place when compared to other OS X equivalents.
Apple licenses MacOS X such that it is available only for its own computers. The license terms forbid installation on other hardware. Certain features of operating system are encrypted so that installing MacOS X on non-standard hardware is no trivial project. A variant of OS X, known as the iOS runs on Apple’s iPad and iPhone. The operating system is equally non-portable to other platforms.
OS X is largely limited to Apple hardware. On the other hand, Linux runs on wide range of hardware. It is also available for Macintosh computers.