# 显示当前网络连接 [root@zabbix ~]# nmcli c show NAME UUID TYPE DEVICE System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 ethernet eth0 System eth1 9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04 ethernet -- # 修改当前网络连接对应的 DNS 服务器,这里的网络连接可以用 NAME 或 UUID [root@zabbix ~]# nmcli con mod "System eth0" +ipv4.dns 8.8.4.4 # 将配置生效 [root@zabbix ~]# nmcli c up "System eth0"