宇筱博客

  • 解决办法
  • 学无止境
  • 记录时光
  • 百宝箱
宇筱博客
点滴记忆,汇聚成海。
  1. 首页
  2. 百宝箱
  3. 正文

CentOS 8 修改 DNS

2023年5月8日 2210点热度 0人点赞 0条评论

1、通过 ifconfig 或 nmcli connection show 命令确定当前使用的网卡名称(如:eth0、eno1 等,以下均以 eno1 为例进行设置)

2、通过命令 nmcli con mod eno1 ipv4.dns "114.114.114.114 8.8.8.8" 修改对应网卡的 dns 设置

3、或通过命令 vi /etc/sysconfig/network-scripts/ifcfg-eno1 修改网卡配置文件,找到 DNS1 的配置进行设置

4、通过命令 systemctl restart NetworkManager.service 或 reboot 重启系统生效

5、通过命令 cat /etc/resolv.conf 查看当前 dns

6、能上网了就可以下载:yum install bind-utils 工具包,以使用 nslookup、host、dig 等命令进行详细诊断。

 

原文连接:点击进入

标签: 暂无
最后更新:2023年5月8日

小渔民

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2025 宇筱博客. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

豫ICP备15017825号-2