I am new to Mac OS X and X code and want to know how to find the MAC address of a machine programmatically in OS X.
Asked
Active
Viewed 9,625 times
3
-
Note that most current Macs will have multiple MAC addresses (one or more Ethernet plus Wi-Fi and possibly other interfaces too). – Paul R Aug 09 '10 at 19:13
2 Answers
5
There's a sample from the Mac OS X Reference Library that gets the MAC address of the primary, built-in interface from the I/O Registry. It also includes an Xcode project.
Fraser Graham
- 4,330
- 4
- 21
- 41
Pedro d'Aquino
- 5,002
- 6
- 33
- 45
1
See: How can I programmatically get the MAC address of an iphone. Should work (although originally asked for iPhone).
Community
- 1
- 1
Kevin Sylvestre
- 36,131
- 31
- 148
- 228
-
yes..I have gone through that post, but will it work for iMac and MacBooks too? Also if I am not wrong it would be a command line application, right? Thank you. – Aniket Aug 09 '10 at 18:55