Can't find mac address of my wireless adapter using terminal from kali linux
Use the following shell script to get the interface with its mac address:
#!/bin/bash
for iface in /sys/class/net/*
do
mac=$(<"$iface/address")
echo "$iface: $mac"
done
You can use ip addr
as you suggested.
Looking at the output on my own Kali Machine:
Ignore the first one (loopback address)
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
Use the second one or one like it for IPv4. My adapter is Ethernet and yours is wireless so it will have a different name.
2: eth0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:xx:xx:ec:2f:b2 brd ff:ff:ff:ff:ff:ff
inet 192.168.xx.xxx/24 brd 192.168.xx.xxx scope global dynamic noprefixroute
Ignore the non-connected IPv6
eth0 valid_lft 1283sec preferred_lft 1283sec
inet6 fe80::20c:29ff:feec:2fb2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
So in the output look for the section with you IP address and there you will see the MAC address as above.
You also may need to be sure the wireless card you have in the Kali machine has drivers for Linux.