This manual page is for Mac OS X version 10.6

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



SW_VERS(1)                               BSD General Commands Manual                              SW_VERS(1)

NAME
     sw_vers -- print Mac OS X operating system version information

SYNOPSIS
     sw_vers
     sw_vers -productName
     sw_vers -productVersion
     sw_vers -buildVersion

DESCRIPTION
     sw_vers prints version information about the Mac OS X or Mac OS X Server operating system running on
     the local machine.

     When executed with no options sw_vers prints a short list of version properties:

           % sw_vers
           ProductName:    Mac OS X
           ProductVersion: 10.3
           BuildVersion:   7A100

     The ProductName property provides the name of the operating system release (typically either "Mac OS X"
     or "Mac OS X Server").  The ProductVersion property defines the version of the operating system release
     (for example, "10.2.4" or "10.3").  The BuildVersion property provides the specific revision of the
     operating system as generated by the Mac OS X build system.

OPTIONS
     The output of sw_vers can be refined by the following options.

     -productName     Print just the value of the ProductName property.

     -productVersion  Print just the value of the ProductVersion property.

     -buildVersion    Print just the value of the BuildVersion property.

EXAMPLES
     % sw_vers -productName
     Mac OS X

     % sw_vers -productVersion
     10.3

     % sw_vers -buildVersion
     7A100

FILES
     /System/Library/CoreServices/SystemVersion.plist
     /System/Library/CoreServices/ServerVersion.plist

Mac OS X                                       March 10, 2003                                       Mac OS X

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.