There are few ways you can use to check OS X version.
What but if you don't have access to GUI or you want to fetch these details through scripts, then you can use below CLI methods to find out the same.
1. sw_vers - This command will show the ProductName, ProductVersion and BuildVersion.
2. System Profile (system_profile) -
3. Mac OS X user defaults system
First and simple one is the GUI. Just click on the Apple menu () at the top left of your screen, and choose About This Mac.
What but if you don't have access to GUI or you want to fetch these details through scripts, then you can use below CLI methods to find out the same.
1. sw_vers - This command will show the ProductName, ProductVersion and BuildVersion.
2. System Profile (system_profile) -
3. Mac OS X user defaults system
4. Let the System speak it for you :)-
5. Kernal and Machine Architecture Details(uname)-
Different available options-