In this MacWorld forum thread, JohnKFisher asked about getting OS X version info when connecting via SSH to another OS X box. After some back and forth, PaulM contributed the easy way to get this info:
[11:13am robg ~]% sw_versJust type 'sw_vers' and you'll get the info on what version of OS X you've connected to. PaulM also points out that the traditional UNIX command is 'uname -a', and that this returns Darwin information on OS X:
ProductName: Mac OS X
ProductVersion: 10.0.4
BuildVersion: 4Q12
[11:13am robg ~]% uname -a[Carriage return added for easier readability]
Darwin localhost 1.3.7 Darwin Kernel Version 1.3.7: Sat Jun 9 11:12:48 PDT 2001;
root:xnu/xnu-124.13.obj~1/RELEASE_PPC Power Macintosh powerpc
•
[2,833 views]

