How to find the MAC address using the command line in Linux
Today, TipsMake.com will talk about an important command in Linux, ip
. This command works on all Linux distributions, including Ubuntu, Arch Linux, Debian, Fedora, etc.
Ip command
The ip
command is a very powerful command that replaces the ifconfig
command and is part of the network tool pack. The general syntax of the command is as follows:
ip xx
Where xx must be replaced with one of the following to get the desired output.
- -V to display ip utility version
- -s to display more information about the command

Find the MAC address of the Linux system
The MAC address is an important parameter of network equipment, including PC hardware or servers. Every PC's network device needs a unique MAC address.
Launch Terminal and enter the ip link
command:
ip link show
Example results:
1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: enp1s0: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether XXXXXXXXXXXX brd ff:ff:ff:ff:ff:ff 3: wlp2s0: mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 link/ether YYYYYYYYYYYY brd ff:ff:ff:ff:ff:ff
1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: enp1s0: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether XXXXXXXXXXXX brd ff:ff:ff:ff:ff:ff 3: wlp2s0: mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 link/ether YYYYYYYYYYYY brd ff:ff:ff:ff:ff:ff
1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: enp1s0: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether XXXXXXXXXXXX brd ff:ff:ff:ff:ff:ff 3: wlp2s0: mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 link/ether YYYYYYYYYYYY brd ff:ff:ff:ff:ff:ff
1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: enp1s0: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether XXXXXXXXXXXX brd ff:ff:ff:ff:ff:ff 3: wlp2s0: mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 link/ether YYYYYYYYYYYY brd ff:ff:ff:ff:ff:ff
The ip
utility will list a few parameters of the device. For each device, there are two lines summarizing the link state and characteristics. The first line summarizes the device's current name, the flags set on the device, MTU (Maximum Transmission Unit), etc.
The second line indicates the type of link layer in use and the current hardware address (MAC address). In the example above, XXXXXXXXXXXX and YYYYYYYYYYY are the MAC addresses of the two LAN connections in use.
You should read it
- How to find the router IP address on any platform
- What is an IP address?
- Link this website to friends, you will know their address via the computer's IP
- How to find the default gateway IP address
- How to change MAC addresses on Windows, Linux and MAC OS X
- Things you need to know about Private IP addresses
- The easiest way to Find IP Address
- How to Get MAC Address Using Remote IP Address
May be interested
- How to format a hard drive into NTFS in Linuxif you are a user moving from linux to windows and vice versa or are collaborating with windows users and need to access the same file, it is best to have a common partition in ntfs format, so that both operating systems are accessible.
- 4 interfaces and Linux distros that can be run on PinePhonepine microsystems created pinephone. some mobile interfaces for linux support pinephone. that is very interesting, but it is important that you decide which option is right for you.
- How to set Terminal as a transparent wallpaper in Kubuntuhaving a terminal ready like the desktop wallpaper sounds appealing. linux terminal comes with many customization options. the following article will show you how to set a terminal as a transparent background in kubuntu using konsole.
- How to check internet speed with the command line in Linuxtoday, tipsmake.com will read how to check the speed of the internet from the command line via terminal in various popular linux distributions, including ubuntu, fedora and arch linux.
- How to use the htop command to monitor system processes in real timethe htop command in linux is a command line utility that allows users to monitor important system processes in real time.
- How to check whether a Linux PC is 64-bit or 32-bit by command linehow to check if your linux system is 32-bit or 64-bit? in this article, tipsmake.com will show you how to define it using the gui and the command line.