Last active
April 6, 2023 14:38
-
-
Save bryankennedy/9273374 to your computer and use it in GitHub Desktop.
OS X Command line tools to get Mac hardware information
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the command line to get Mac hardware info, like the serial number. | |
# Returns a paragraph of basic hardware information | |
system_profiler SPHardwareDataType | |
# Returns a sentence on the serial number: | |
# Serial Number (system): <number> | |
system_profiler SPHardwareDataType | grep "Serial Number" | |
# Returns just the serial number | |
ioreg -c "IOPlatformExpertDevice" | awk '/IOPlatformSerialNumber/ {print $4}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment