How to get MAC address from ifconfig

How can I get MAC address on my notebook? I know I must input ifconfig, but I don't see the line "HWaddr". This is my output:

$ sudo ifconfig
enp3s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 28:d2:44:e8:30:6a txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Локальная петля (Loopback)) RX packets 346 bytes 25136 (25.1 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 346 bytes 25136 (25.1 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.21 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::14ad:7ca7:54ef:869a prefixlen 64 scopeid 0x20<link> ether 38:b1:db:c7:a5:27 txqueuelen 1000 (Ethernet) RX packets 25121 bytes 28532799 (28.5 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 19936 bytes 2836709 (2.8 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Where is MAC address here?

2 Answers

Your mac address are being shown under ether lines.

ether 28:d2:44:e8:30:6a 

and

ether 38:b1:db:c7:a5:27

You can even use nmcli to get your mac address:

nmcli device show enp3s0 | grep -i hw

or

nmcli device show wlp4s0 | grep -i hw

both outputs will be similar to:

GENERAL.HWADDR: 38:b1:db:c7:a5:27

Go to System Settings. Select Network. Click on the settings next to your current connection (Wired or Wifi). Then mac address will be available under the name Hardware address. Or you can switch to the tab labelled Identity - MAC Address will be specified there (Ubunutu 18.04)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like