Skip to content

Instantly share code, notes, and snippets.

@muhamad-ridwant-tech
Created July 29, 2025 06:00
Show Gist options
  • Save muhamad-ridwant-tech/c015be714225c03d9ce7c1339eaee64c to your computer and use it in GitHub Desktop.
Save muhamad-ridwant-tech/c015be714225c03d9ce7c1339eaee64c to your computer and use it in GitHub Desktop.
How to use "nmcli" for network config
## list all network connections / ip a
$ sudo nmcli connection show
## Set static network
$ sudo nmcli con mod "Network Name" \
ipv4.method manual \
ipv4.addresses 192.168.15.14/24 \
ipv4.gateway 192.168.15.1 \
ipv4.dns 8.8.8.8
## Set DHCP network
$ sudo nmcli con mod "Network Name" \
ipv4.method auto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment