Reputation: 131
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.
Upvotes: 2
Views: 10584
Reputation: 2815
for macOS 13.2
:
ifconfig en0 | mawk 'NF *= NF==2' FS='^[ \t]*ether ' OFS=
f8:4d:89:1a:73:d9
Upvotes: -1
Reputation: 3011
Bash Solution
ifconfig | grep -A 6 en0 | grep -o ether.* | awk '{print $2}'
Upvotes: -1