nmcli add static ip

nmcli device status
nmcli connection add type ethernet con-name NAME_OF_CONNECTION ifname interface-name ip4 IP_ADDRESS gw4 GW_ADDRESS

Set DNS:
nmcli connection modify NAME_OF_CONNECTION ipv4.dns “8.8.8.8 8.8.4.4”

Up connection:
nmcli connection up NAME_OF_CONNECTION ifname interface-name

Leave a Reply

Your email address will not be published. Required fields are marked *