1.查看dns命令:cat /etc/resolv.conf 2.修改dns地址 vim /etc/resolv.conf 点击“i”进入编辑模式,添加相应内容,按“ctrl+c"键退出,然后输入:qw保存,输入:q!不保存