Debian9.4更换源的正确姿势

备份原有的源配置文件

$ cp /etc/apt/sources.list /etc/apt/sources.listbak 

#删除该源配置文件

$ rm -f /etc/apt/sources.list

#生成国内的源配置文件

$ echo "deb http://ftp.cn.debian.org/debian/ stretch main" > /etc/apt/sources.list

$ echo "deb http://ftp.cn.debian.org/debian/ stretch-updates main" >> /etc/apt/sources.list

$ echo "deb http://ftp.cn.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list

#更新源

$ apt-get update

debian的全球镜像站:

https://www.debian.org/mirror/list

转载于:https://blog.csdn.net/github_38313789/article/details/80675556

注意事项:网络不通使用ifup  网卡名字

安装ssh工具

apt-get install ssh按y确认安装

配置多个ip:

auto enp1s0f0
iface enp1s0f0 inet static
address 103.97.229.247
netmask 255.255.255.0
gateway 103.97.229.254
auto enp1s0f0:1
iface enp1s0f0:1 inet static
address 103.97.229.248
netmask 255.255.255.0

auto enp1s0f0:2
iface enp1s0f0:2 inet static
address 103.97.229.165
netmask 255.255.255.0

dns-nameservers 114.114.114.114 8.8.8.8 

原文地址:https://www.cnblogs.com/rui517hua20/p/11439489.html