nmcli con show NAME UUID TYPE DEVICE eth0 XX ethernet eth0 lo XX loopback lo
例如,配置eth0网卡的static ip为10.206.216.93, gateway 10.206.216.254, DNS 10.204.16.18
1 2 3
nmcli con del eth0 nmcli con add con-name eth0 autoconnect yes type ethernet ifname eth0 ip4 10.206.216.93/24 gw4 10.206.216.254 ipv4.dns "8.8.8.8 4.4.4.4" nmcli con up eth0