Linux网络配置
来源:互联网 发布:软件测试管理体系 编辑:程序博客网 时间:2024/05/16 14:51
1、用vi 打开/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0 (自动识别启动以太网)
iface eth0 inet static (固定IP地址,static改成dhcp并注释下面三行自动获取IP)
address xxx.xxx.xxx.xxx (虚拟机IP地址)
gateway xxx.xxx.xxx.xxx (网关)
netmask xxx.xxx.xxx.xxx (子网掩码,C类为255.255.255.0,B类为255.255.0.0)
2、用vi打开/etc/resolv.conf在末尾添加
nameserver 202.96.134.133
3、配置网关
sudo route add default gw xxx.xxx.xxx.xxx
4、重新加载网络
sudo /etc/init.d/networking force-reload
sudo /etc/init.d/networking restart
5、还不行就重启系统
0 0
- 网络 linux网络配置
- linux配置网络配置
- Linux网络基本网络配置
- 【网络】Linux网络相关配置
- Linux网络基本网络配置
- linux网络配置基础
- Linux网络配置
- 手动配置linux网络
- linux 网络配置
- linux 网络配置
- Linux网络配置
- Linux网络环境配置
- LINUX网络配置
- Linux 网络配置ifconfig
- linux网络配置
- Linux 网络配置
- linux 网络配置
- redhat linux网络配置
- Andorid中UI控件的详细介绍(四)——EditText
- 16读取通话记录
- 放肆的使用UIBezierPath和CAShapeLayer画各种图形(含仿微信视频眼镜Demo)
- 程序员必学,英文构词前缀
- Po学校Lesson12
- Linux网络配置
- 20个实用的正则表达式
- 查看日志
- 自定义Linux系统终端界面(Oh_My_Zsh)
- Windows下查看进程命令行参数
- mysql-5.7在windows7下安装和vs2013下的配置
- SV 队列位宽的定义
- android中清除缓存数据
- HTML5学习记录之文本元素