Created
July 29, 2025 06:00
-
-
Save muhamad-ridwant-tech/c015be714225c03d9ce7c1339eaee64c to your computer and use it in GitHub Desktop.
How to use "nmcli" for network config
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
## 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