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 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM