Date created: Sunday, September 17, 2023 10:48:00 AM. Last modified: Sunday, September 8, 2024 12:29:18 PM
'nmcli' Notes
Show which devices are managed by the system and which are not:
$ nmcli device status
DEVICE TYPE STATE CONNECTION
br-0fcfa25a8aa9 bridge connected (externally) br-0fcfa25a8aa9
br-578f5829c361 bridge connected (externally) br-578f5829c361
docker0 bridge connected (externally) docker0
br-587a54e4fa19 bridge connected (externally) br-587a54e4fa19
br-757a277e9235 bridge connected (externally) br-757a277e9235
br-aeeb4ae82611 bridge connected (externally) br-aeeb4ae82611
eth0 ethernet unmanaged --
veth4f7b25d ethernet unmanaged --
veth6703ac3 ethernet unmanaged --
veth9243b6b ethernet unmanaged --
lo loopback unmanaged --
# Also
$ nmcli -g all
Get the non-default configuration of an interface:
$ nmcli device show
$ nmcli device show eth0
GENERAL.DEVICE: eth0
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 00:1E:06:AA:BB:CC
GENERAL.MTU: 1500
GENERAL.STATE: 10 (unmanaged)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
WIRED-PROPERTIES.CARRIER: on
IP4.ADDRESS[1]: 192.168.0.5/24
IP4.GATEWAY: 192.168.0.254
IP4.ROUTE[1]: dst = 192.168.0.0/24, nh = 0.0.0.0, mt = 0
IP4.ROUTE[2]: dst = 0.0.0.0/0, nh = 192.168.0.254, mt = 0
IP6.ADDRESS[1]: 2003:::5/64
IP6.ADDRESS[2]: fd::5/64
IP6.ADDRESS[3]: fe80::5/64
IP6.GATEWAY: fe80::31d6
IP6.ROUTE[1]: dst = ff00::/8, nh = ::, mt = 256, table=255
IP6.ROUTE[2]: dst = fe80::/64, nh = ::, mt = 256
IP6.ROUTE[3]: dst = fd::/64, nh = ::, mt = 256
IP6.ROUTE[4]: dst = ::/0, nh = fe80::31d6, mt = 100
IP6.ROUTE[5]: dst = 2003::/64, nh = ::, mt = 100
Show connection UUIDs
$ nmcli con NAME UUID TYPE DEVICE Wired connection 1 1d241a7a-6dcb-11ef-9e05-dfcdde7a2112 ethernet eth0 docker0 1d66dbf8-6dcb-11ef-97c2-b364a83594c6 bridge docker0
Show connection full configuration:
$ nmcli connection show 1d241a7a-6dcb-11ef-9e05-dfcdde7a2112
Change a setting:
# Disable IPv6 privacy extensions
sudo nmcli connection modify 1d241a7a-6dcb-11ef-9e05-dfcdde7a2112 ipv6.addr-gen-mode eui64
# Enable IPv6 privacy extensions
sudo nmcli connection modify 1d241a7a-6dcb-11ef-9e05-dfcdde7a2112 ipv6.addr-gen-mode stable-privacy
# Add "+" or remove "-" and IP address
sudo nmcli connection modify 1d241a7a-6dcb-11ef-9e05-dfcdde7a2112 +ipv6.addresses "aaaa::bbbb/64"
Apply changes:
sudo nmcli d connect eth0
Previous page: Networking Commands
Next page: PPPoE Setup