If need to locate your Mac’s serial number, there is an easier way than trying to locate it on the hardware itself. For example, on my MacBook Pro the number is located under the battery. Let’s find it through the software instead.
You can use either the command line or the user interface locate your Mac’s serial number.
User Interface:
1. Go to the Menu bar and click the Apple icon.
2. Select About This Mac.
3. When the About This Mac window appears, click on the Version number beneath the Mac OS X label.
4. The Build number will appear. Click the Build number.
5. The Serial Number will appear.
Command Line:
1. Open Terminal.
2. Execute the following Terminal command:
system_profiler |grep "r (system)"
The system Serial Number will appear:
robrogers$ system_profiler |grep "r (system)"
Serial Number (system): W87033XXXXX