#ifconfig    找到左上角  ens33

 

编辑# vi /etc/sysconfig/network-scripts/ifcfg-ens33

 

IPADDR=                           #ip地址
GATEWAY=                        #网关
NETMASK=                         #子网掩码

添加一行加粗部分:
DNS1=                        #与网关一致

重启  service network restart
Restarting network (via systemctl):                        [  确定  ]

ok

虚拟机网关:

linux centos7 ping: www.baidu.com: 未知的名称或服务

 

相关文章:

  • 2022-03-09
  • 2021-09-04
  • 2021-10-19
  • 2021-11-25
  • 2022-12-23
  • 2021-06-14
  • 2022-12-23
猜你喜欢
  • 2021-08-22
  • 2021-08-09
  • 2021-06-23
  • 2022-12-23
  • 2022-01-01
相关资源
相似解决方案