Mines of information
Where can you go to find that crucial piece of information in macOS? If it doesn’t appear in System Information, or you need it in a script or app, there are still plenty of places to look.
Domain-specific tools
The first place to look is in a feature or command tool specific to that domain. Controls that can be put in the menu bar, such as Bluetooth and Wi-Fi, often provide detailed information when you open their menu with the Option key held. There are also command tools like diskutil for local disks, csrutil for security policies, and hdiutil for disk images. Although most of those are now encumbered with so many verbs and options, and their man pages are often out of date, try a -h help option in Terminal.
sysctl
I’ve recently exposed the contents of this invaluable command tool in my free app Mints, which contains its own mines of information. You’ll find a complete page explaining some of its hidden gems here.
system_profiler
This command tool gives access to pretty well everything you can access in System Information, and more. While you can just enter
system_profiler
to get a general overview of what’s available, that’s generally too long when you’re hunting something down, and it’s best used on specific datatypes (or domains). To get a list of those, use
system_profiler -listDataTypes
which will return a full list for the Mac you’re running it on. For example,
system_profiler SPiBridgeDataType
will return architecture-specific information that, in the case of Apple silicon Macs, gives full details of Boot Policy.
What’s strange about system_profiler is that it’s one of the few localised command tools. Change your Mac’s primary language, and the results are shown in that language. If you’re intending to parse its results in a script or app, that could be a problem, as there appears to be no way to guarantee that those results will be in English or any other language. Although it offers the options of XML or JSON output, before opting for either of those, check whether you really fancy parsing that instead of the more concise plain text output.
IOKit Registry
For I/O devices, this is the most comprehensive source of information, but vast, fiendishly difficult to navigate, and not straightforward to access even when you know what you’re looking for. This registry is assembled during the boot process, and contains entries for every I/O device your Mac could ever want to use. It’s also where sysctl gets most if not all its information from. Apple provides documentation aimed at developers, and for those preferring to browse its treasures, there’s IOBrowser, free and open source from here.
Happy hunting!