Bootstrap FreeKB - Network Manager (nmcli) - List Devices using the nmcli connection command
Network Manager (nmcli) - List Devices using the nmcli connection command


The nmcli connection command can be used to list your network interfaces. Something like this should be returned. Often, this will produce the same exact output as the nmcli connection show command.

~]# nmcli connection
NAME  UUID                                  TYPE      DEVICE 
eth0  5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03  ethernet  eth0

 

Often, this will produce the same exact output as the nmcli connection show command.

~]# nmcli connection show
NAME  UUID                                  TYPE      DEVICE 
eth0  5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03  ethernet  eth0

 

The --active flag can be used to only return active devices.

~]# nmcli connection show --active
NAME  UUID                                  TYPE      DEVICE 
eth0  5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03  ethernet  eth0

 

The -t or --terse option can be used to return the output as a colon separated delimited string.

~]# nmcli --terse connection show
eth0:5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03:ethernet:eth0

 

The --mode multiline option can be used to return the output on multiple lines.

~]# nmcli --mode multiline connection show
NAME:                                   eth0
UUID:                                   5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
TYPE:                                   ethernet
DEVICE:                                 eth0



Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter dd1109 in the box below so that we can be sure you are a human.