It can be useful to retrieve information about a Mac from the command line. For example, if you have booted into recovery mode or to an installer, or you have done a remote SSH session to another computer.
This command shows piles of stuff, but is slow: system_profiler
Shows lots of system paramaters, fast: sysctl -a
Show running OS version: sw_vers
Show OS version on disk: cat /Volumes/Macintosh\ HD/System/Library/CoreServices/SystemVersion.plist. Note: Assumes disk is called "Macintosh HD".
Show free space on volumes: df -H
Show model number only: system_profiler SPHardwareDataType | grep 'Model Identifier'
I usually write a blog post about once a week. The latest post can be viewed here: Avoid Microsoft: If you don't really like computers much you could make things a bit better for yourself. (posted 2024-12-04 at 12:05:50). I do podcasts too!. You can listen to my latest podcast, here: OJB's Podcast 2024-12-04 Avoid Microsoft: If you don't really like computers much you could make things a bit better for yourself..