按照老师给的文件一步一步做还是不行
[hsnalocathost ~]$ su
密码:
[rootalocalhost hsnl# vi /etc/resoly.conf
[root@localhost hsnl# source /etc/resolv.conf
bash: nameserver:未找到命令..
bash: nameserver:末找到命令..
[root@localhost hsnl# ping baidu.com
ping: baidu.com:未知的名称或服务
Iroot@localhost hsnl# ping
ping不同百度是虚拟机的问题,xshell只是工具。
参考如下可以解决:
应该是百度的服务器屏蔽了ping命令,不允许暴露IP地址。
先检查系统是否能正常访问外网,网卡是否开启。
cat /etc/resolv.conf 看下你配的dns 域名解析是啥
一个笨办法 你在 windows 下 ping 看下它的ip 是多少
然后
echo "xxxxx(ip) www.baidu.com" >>/etc/hosts
就可以了
排错dns