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 1.0k times
        
    2
            
            
        - 
                    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
3 Answers
-1
            
            
        Bash Solution
ifconfig  | grep -A 6 en0 | grep -o ether.* | awk '{print $2}'
 
    
    
        sdc
        
- 2,603
- 1
- 27
- 40
- 
                    The question is tagged Objective-C and asks how to get the MAC address programmatically. Using a shell command does not answer the question being asked. – HangarRash Jun 07 '23 at 14:33
-1
            
            
        for macOS 13.2 :
ifconfig en0 | mawk 'NF *= NF==2' FS='^[ \t]*ether ' OFS=
f8:4d:89:1a:73:d9
 
    
    
        RARE Kpop Manifesto
        
- 2,453
- 3
- 11
- 
                    The question is tagged Objective-C and asks how to get the MAC address programmatically. Using a shell command does not answer the question being asked. – HangarRash Jun 07 '23 at 14:33
-1
            
            
        Try below solution.
ifconfig en1 | awk '/ether/{print $2}'
 
    
    
        infiniteLearner
        
- 3,555
- 2
- 23
- 32
 
    
    
        Akansha
        
- 132
- 8
- 
                    The question is tagged Objective-C and asks how to get the MAC address programmatically. Using a shell command does not answer the question being asked. – HangarRash Jun 07 '23 at 14:33
 
    