Sometimes, you may need to know the MAC address of the network card, for example, to configure the router or to turn on the computer via Wake-on-LAN. On Linux-based systems, this can be done quite quickly using the built-in tools. In today's article, I'll tell you how to find the MAC address of your network card.
Find MAC address in Ubuntu via GUI
Using Ubuntu 22.04 with Gnome as an example, I'll show you how to find out the MAC address using the GUI. This method is great for beginners as you don't have to use the terminal.
Let's get started:
- In the upper right corner, click on the tray icons.
- Next, click on "Wired Connected", then "Wired Settings" (as shown in the screenshot). If you are connected via Wi-Fi, then the principle will be the same.
- In the window that opens, next to your connection, click on the "gear".
- On the "Details" tab in the line with "Hardware address" you can see your MAC address.
As you can see, everything is quite simple. On other distros where the desktop environment is Gnome, all steps are identical.
Find MAC address in Ubuntu via command line
In almost all operating systems based on the Linux kernel, there are two commands that can be used to find out the MAC address of a device: ifconfig and ip. Let's start with the most popular ifconfig.
Find MAC address using ifconfig
The ifconfig command is considered slightly obsolete today. Users prefer the ip command. Although, ifconfig does its job well.
Most likely, ifconfig won't be installed. The package with some network utilities (including ifconfig) is called net-tools. Let's install it:
sudo apt-get install net-tools
If the installation was successful, proceed to use the command.
To get the MAC address, enter the following command:
ifconfig -a | grep ether
The console output will show the MAC addresses of all your network cards. In our case, we only have one network card.
Find MAC address using ip
On newer Linux distros, the ip utility is preinstalled by default. The principle of operation is not much different from ifconfig. They differ in syntax and output information.
To get the MAC address, enter the following command:
ip a | grep ether
Conclusion
In order to get all the information about the MAC address, you need to know one of two popular commands: ip or ifconfig. But if you're not familiar with the terminal, you can always use the GUI. As you can see, everything is very simple.
Have questions? Facing problems? Write in the comments.
Related posts
Pop OS vs Manjaro: Detailed Comparison
Mar 09, 2021What should I do when Ubuntu freezes?
Mar 17, 2021How to Install and Use Telnet on Linux
Jun 02, 2022How to disable hardware acceleration in Microsoft Edge
Jan 27, 2021Top 8 Linux Distros for Browsing only
May 25, 2022