sw_vers — stdin  stdout  - file  -- opt  --help  --version


sw_vers [options]

The sw_vers command displays the OS X software version on your Macintosh:

ProductName:    Mac OS X
ProductVersion: 10.7.3
BuildVersion:   11D50

Useful options


Print only the product name.


Print only the product version.


Print only the build version.

Get Macintosh Terminal Pocket Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.