The serial number will always appear as an alphanumeric string alongside “Serial Number (system)”, if you simply grep for “serial” you’ll find a huge number of returns that are unrelated to the systems actual serial number, thus we don’t do that. $ system_profiler |grep "Serial Number (system)" The results for this string will look something like the following: System_profiler |grep "Serial Number (system)" On prior versions of Mac OS X like El Capitan, Yosemite, and Mavericks, the following string will retrieve the Macs serial number: "IOPlatformSerialNumber" = "C241BABDLLRP8" How to Get Serial Number by Command Line in Prior Mac OS X The resulting output with serial number will look like the following: On modern versions of MacOS like Mojave, High Sierra, and Sierra, or newer, the following command syntax will retrieve the serial number from the Mac: How to Get Mac Serial Number by Command Line in Modern MacOS Be sure the command is on a single line, as usual with command line syntax. ![]() ![]() To try this yourself and get the serial number on any Mac OS machine, enter the appropriate command string below at the Terminal, depending on the version of Mac OS X in use on the Mac. ![]() How to Get the Serial Number of a Mac from Command Line in Mac OS X
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |