debian网络和源设置(新手)

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



猜你喜欢

转载自blog.csdn.net/tc291695377/article/details/51563339
今日推荐