The macOS 12 is the latest release by the Apple team. Its code name is Monterey, derived from an unmapped wilderness area that lies along the coast south of Monterey. The is the most advanced desktop operating system with a new level of power and beauty.

Advertisement

This tutorial will describe how to check the macOS version from the desktop and command-line interface.

Check MacOS Version (GUI)

Login to your macOS system. In the top-left corner, click on the apple icon. Then click the “About This Mac” in the dropdown menu. See the below screenshot:

Check MacOS Version Details
Click on the “about this mac”

This will display the macOS version along with the system configuration details.

Show macOS version details

The above screenshot shows that we’re using macOS Monterey, which is version 12.5.

Check MacOS Version via CLI

Open the terminal application on your macOS and type the following command to check the macOS version.

sw_vers 

Output:

ProductName:    macOS
ProductVersion: 12.5
BuildVersion:   21G72

You can also fetch the specific values only. Which can be useful for scripting like shell scripts. Use the following command line parameters:

  • Use -productName to print the value of the ProductName only
    sw_vers -productName
    
    macOS
    
  • Use -productVersion to print the value of ProductVersion. This is the version of your macOS, which is generally required with scripting to check the macOS version:
    sw_vers -productVersion
    
    12.5
    
  • Use -buildVersion to print the value of the BuildVersion property only.
    sw_vers -buildVersion
    
    21G72
    

Conclusion

In this tutorial, you have learned to check the macOS version running on your Apple desktop system. That helps you to find the correct packages for the macOS and make automation scripts.

Share.
Leave A Reply


Exit mobile version