Skip to content

How to Check MacOS Version (GUI+CLI)

Check macOS version runnign on your desktop. Command to find macOS version. How to check macOS version on desktop and command interface.

Category
macOS
Versions & support
About macOS →
On this page

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.

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.

How to Find MacOS Version
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.

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top