Linux has absolutely nothing to do with any version of Mac OSX.
Mac OSX is a true Unix operating system
Linux is a Unix-like operating system
At the command line (Terminal.app in OSX) there are some similarities and some differences. If you are simply looking to learn Unix command-line basics either will be fine. If you are looking to learn about Linux specifics you will need to install Linux.