虚拟机中安装了Redhat linux 5, 有图形化界面, 使用firefox无法访问网络
1. 确保VM相关的服务已启动(services.msc)
2. VM -> Settings... -> Network Adapter:
勾选Connected和Connect at power on
Network connection: NAT: Used to share the host's IP address
3. 用root用户执行netconfig命令
[root@localhost ~]# netconfig
在弹出的以下界面中, 按回车键(Enter)
P.S.: 如果netconfig命令无法使用, 多数是这个命令的软件包没有安装, 参考http://www.jbxue.com/LINUXjishu/3801.html进行安装
4. 在弹出的对话框中, 按空格键选中"Use dynamic IP configuration (BOOTP/DHCP)" -> 按Tab键将光标定位到OK -> 回车确定即可
5. 执行命令重启网络即可
[root@localhost ~]# service network restart
参考文章: http://blog.youkuaiyun.com/fallinsky/article/details/6030249