To totally unlock this section you need to Log-in
Login
You can quickly retrieve any Mac's serial number via the command line by using the following command string:
system_profiler |grep "r (system)"
The command results will look something like this:
$ system_profiler | grep "r (system)"
Serial Number (system): C24E1322XXXX
If you just grep for “Serial Number” you’ll be presented with serial numbers to other hardware included in the Mac, which is why the “r (system)” qualifier is included.
The following commands are alternatives to the above command:
system_profiler SPHardwareDataType | grep “Serial”
Or:
system_profiler | less
Or:
system_profiler SPHardwareDataType | awk ‘/Serial Number/ { print $4; }’
For some reason do you need the serial number of your beloved Mac? :mrgreen:
If you’re a command line’s addicted user you’ll find these commands very useful; you can read them on HeelpBook:
Get a Mac’s Serial Number from the Command Line – http://heelpbook.altervista.org/2014/get-a-macs-serial-number-from-the-command-line/ @heelpbook #howto #heelpbook #apple #serial #cli