Share this post with your friends
Today I was looking at the
/etc/sysconfig/network-scripts/ifcfg-enp0s3 file and I came across the line that says
UUID. I was thinking what is UUID of a network interface? Then I started thinking about how to find UUIDs of network interfaces. I looked on the internet but I got no solution. Then I thought of trying to find it myself using network management commands. I did find a solution.
To find the UUIDs of your network connection, run the following command.
nmcli connection show
NAME UUID TYPE DEVICE
virbr0 4e02750f-13d9-4662-bfc2-10f9ae1a71bd bridge virbr0
Wired connection 1 09066de3-7eb7-4ee1-9059-c651b6dff7a6 802-3-ethernet --
enp0s3 5144084b-0537-4e4b-9f15-065431bc6d38 802-3-ethernet --
From the output of this command, you can find the UUID of a connection on CentOS, Fedora, RedHat(RHEL), Ubuntu, Debian operating systems.
Tested on: CentOS 7, Ubuntu 16.04 LTS