Quantcast
Channel: Output only MAC address on Ubuntu - Ask Ubuntu
Viewing all articles
Browse latest Browse all 9

Answer by rukn for Output only MAC address on Ubuntu

$
0
0

There are several ways for this :

$ /sys/class/net//address

this is the default location where u can find out the mac of any device.

$ cat /sys/class/net/*/addressis the easiest way to find out mac of hardware parts in ur ubuntu PC.

$ ifconfig -awill also provide the same details with some extra data.or you can use the grep to filter out the mac alone like :$ ifconfig -a | grep HWaddr | awk '{print $5}'

other commands :

$ ifconfig eth0

$ ip link show

$ ip -o link show eth0

Here in this blog it is explaining the same and several other ways to get this.


Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>