How to find out macOS version information from Terminal command prompt

www.lautt‮moc.iru‬
How to find out macOS version information from Terminal command prompt

To find out the version information for your macOS system using the Terminal command line, you can use the sw_vers command.

Here is the syntax for using the sw_vers command:

sw_vers

When you run this command, it will display the following information about your macOS system:

  • ProductName: The name of the macOS release, such as "macOS Big Sur"
  • ProductVersion: The version number of the macOS release, such as "11.0"
  • BuildVersion: The build number of the macOS release, such as "20A5354i"

For example, if you are running macOS Big Sur version 11.0, the sw_vers command will display output similar to this:

ProductName:    macOS
ProductVersion: 11.0
BuildVersion:   20A5354i

You can also use the system_profiler command to display more detailed information about your system, including hardware and software specifications.

Here is the syntax for using the system_profiler command:

system_profiler

This command will display a detailed report of your system's hardware and software configuration. You can use the grep command to filter the output and display only specific information. For example, to display only the macOS version information, you can use the following command:

system_profiler | grep "System Version"

This will display output similar to this:

System Version: macOS 11.0 (20A5354i)
Created Time:2017-10-28 21:39:03  Author:lautturi