Last active
June 14, 2024 15:18
-
-
Save thetinygoat/cd0e20cb16fda6a5505ec410fe249fe4 to your computer and use it in GitHub Desktop.
Network Management using nmcli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set dns | |
nmcli conn mod "<name>" ipv4.dns "8.8.8.8 8.8.4.4" | |
# disable auto dns by dhcp | |
nmcli conn mod "<name>" ipv4.ignore-auto-dns yes | |
# set static ip | |
nmcli conn mod "<name>" ipv4.method manual ipv4.addresses <static_ip/subnet_mask> ipv4.gateway <gateway_addr> | |
# go back to dhcp | |
nmcli conn mod "<name>" ipv4.method auto |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment