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:
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)