Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I find out what the mac address of the w-lan accesspoint I'm connected to is?

share|improve this question

2 Answers 2

up vote 7 down vote accepted

Any of these 3 works:

  • arping 192.168.0.1 Change the IP adress to whatever you use. The MAC address is in the reply between brackets.

  • iwconfig | grep "Access Point". Access point will be colored and behind it the MAC address.

  • iwlist wlan0 scan | grep Address same as previous command (color etc).

share|improve this answer
    
iwlist wlan0 scan|grep worked, thank you a lot :) –  user1392185 Nov 27 '12 at 13:17

If you are using a recent desktop version of Ubuntu (with interfaces managed by network-manager) then nmcli is a more configurable option than nm-tool. For example, to list some common information including SSID, access point MAC (BSSID), channel frequency, signal strength etc. for all the access points seen by the active wifi device you can use

nmcli dev wifi list 

You can limit the output to specific fields e.g. to see just the access point MAC addresses (BSSIDs) and connection status, use

nmcli -f BSSID,ACTIVE dev wifi list

To return just the MAC address to which the wifi device is currently connected (i.e. the access point whose ACTIVE field is 'yes'), you can use

nmcli -f BSSID,ACTIVE dev wifi list | awk '$2 ~ /yes/ {print $1}'
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.