How to view your computer's MAC address using 'ifconfig'?
First, your computer doesn't have a MAC address. Your network card has a MAC address. So if you have a wireless card and an Ethernet card, you'll have two MAC addresses.
On Linux, either of these commands will show you the MACs of all network cards in your machine:
ifconfig | grep ether
ip link
ifconfig
is deprecated on Linux, so you should use ip
.
The command that you want on MacOS, FreeBSD, and TrueOS is:
ifconfig -a link
OpenBSD's ifconfig
doesn't have this.
Further reading
ifconfig
. Mac OS 10 Manual Pages. Apple corporation. 2008.ifconfig
. FreeBSD Manual Pages. 2015.- https://unix.stackexchange.com/a/319354/5132
For many linux systems ipconfig
doesn't show the mac anymore. If that is the case for you, try: