up vote 5 down vote favorite
3
share [g+] share [fb]

I know how to find Mac OS X version from GUI: Apple Menu (top left) > About This Mac

Is there a Terminal command that will tell me Mac OS X version?

link|improve this question

75% accept rate
feedback

2 Answers

up vote 10 down vote accepted

You have a few options:

sw_vers

system_profiler SPSoftwareDataType

Either will do what you need, and will have an output format that's parseable (if that's what you're after).

link|improve this answer
sw_vers is all I need. Thanks! :) – Željko Filipin Nov 25 '09 at 21:09
feedback

Don't have a Mac in front of me to verify, but I believe running uname would return that. However, it may only return the edition of Darwin running.

link|improve this answer
uname just returns Darwin. uname -a returns Darwin Mac.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386 on SL - the 10.2.0 is the kernel version, which doesn't match the OS ver which is 10.6. – Rich Bradshaw Nov 25 '09 at 13:29
Bur Kernel version 10 corresponds to OS X Version 10.6. Therefore Darwin 10.2 ≘ OS 10.6.2. Leopard Kernel had Darwin version 9. – Debilski Nov 25 '09 at 14:46
1  
Sure, Debilski, but that's not what the OP asked for -- he explicitly asked for the OS X version number, not the kernel version which he could then use a lookup table to turn into an OS X version number. – delfuego Nov 25 '09 at 15:06
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.