Skip to content

Instantly share code, notes, and snippets.

@fredeerock
Created May 16, 2019 18:44
Show Gist options
  • Save fredeerock/7e6849a063828fb6277436cffcc33e25 to your computer and use it in GitHub Desktop.
Save fredeerock/7e6849a063828fb6277436cffcc33e25 to your computer and use it in GitHub Desktop.
Rename a networkmanager connection without knowing the original connection name.
#!/bin/bash
nmcli -g UUID c show | while read line; do if [ `nmcli -g connection.interface-name c s $line` = $LAN_IFACE ]; then nmcli c mod $line con-name lan-con; fi; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment