Tip - Get the OS X Version From CLI

If you are logged into OS X as usual, you can get your system version from “About This Mac” in the Apple menu. This is not helpful when you are remotely connected to a server via SSH, however. So how do you do it?

You can get OS X’s version from the command line, like this:

Get Version of OS X
1
2
3
4
rcogley@RickMBP ~ % sw_vers
ProductName: Mac OS X
ProductVersion:  10.8.2
BuildVersion:    12C3006