IP设置要在/etc/network/interfaces配置
具体配置:
auto eth0 #开机自启网卡
iface eth0 inet dhcp(static)#使用dhcp服务(或者静态IP)
address ip地址
netmask 掩码
gateway 网关
设置完保存
设置dns服务器地址
在/etc/resolv.conf配置
nameserver 首dns
nameserver 次dns
重启网卡
service networking restart
如果使用nano修改配置文件是要使用 nano -w filename
ifdown 卸载网卡
ifup 加载网卡
源
vi /etc/apt/source.list