开心过好每天!
2013年(23)
分类: LINUX
2013-08-31 22:30:36
1、配置IP
sudo gedit /etc/network/interfaces
原内容:
auto lo
iface lo inet loopback
修改为:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.124
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
2、修改备份DNS配置
sudo gedit /etc/resolvconf/resolv.conf.d/head
添加:
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 192.168.1.1
3、重启网卡
sudo /etc/init.d/networking restart
4、如果是虚拟机,在VM--->Setting--->NetWork Adapter设置连接方式为:Bridged(桥接),等待网络重置成功后即可