How to Know UUID of a Network Interface Card

  • by
In some cases, you might want to know UUID of NICs, here is the command to see the information on Enterprise Linux 7.
[root@test ~]# nmcli c
NAME  UUID                                  TYPE            DEVICE
eth0  7d412d6c-d2b4-4561-b5f5-7260b23bb3b5  802-3-ethernet  eth0
eth2  3a73717e-65ab-93e8-b518-24f5af32dc0d  802-3-ethernet  eth2
eth1  9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04  802-3-ethernet  eth1

The command nmcli c is an abbreviated form of nmcli connection. They are equal. By the way, the column NAME and DEVICE map to the attribute NAME and DEVICE respectively in the configuration file.
[root@test ~]# egrep '^(NAME|DEVICE)' /etc/sysconfig/network-scripts/ifcfg-eth2
NAME=eth2
DEVICE=eth2

Another way to know UUID of a specific NIC:
[root@test ~]# grep UUID /etc/sysconfig/network-scripts/ifcfg-eth2
UUID=3a73717e-65ab-93e8-b518-24f5af32dc0d

Leave a Reply

Your email address will not be published. Required fields are marked *