【Ubuntu】国内源配置

本文介绍了如何将Ubuntu16.04的软件源更换为阿里云的镜像源,以提高下载速度。首先备份原有的sources.list文件,然后清空文件并粘贴阿里云的镜像源地址,最后使用apt-get更新系统。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Ubuntu16.04 配置国内源

由于原先的软件源的速度慢,所以就需要换源配置,让软件源下载得更快。

步骤

🌳一、由于配置国内源风险太大,所以我们首先要采取备份文件:

sudo  cp  /etc/apt/sources.list sources_backup.list

界面如下:

🌳二、查看文件(发现备份的文件sources_backup.list在目录里面)

ls -l

界面如下:

🌳三、国内源:(这是国内源,可以在百度上直接寻找其他的,清空原有的文件,复制下面的文件并且保存退出)

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

🌳四、输入下面的三条命令的其中的一个,清除里面的文件,同时将上面的国内源复制下来,保存退出。

 sudo gedit  /etc/apt/sources.list

或者:sudo vim  /etc/apt/sources.list

或者:sudo nano  /etc/apt/sources.list

界面如下:

🌳五、更新

sudo apt-get updatae

或者:sudo apt-get  -f install

或者:sudo apt-get  upgrade

界面如下:

 

### 配置 Ubuntu 9.3 的国内镜像源 对于 Ubuntu 系统而言,配置国内镜像源可以显著提高软件包下载速度。针对 Ubuntu 9.3 版本的操作如下: 编辑 `/etc/apt/sources.list` 文件来替换默认的国外服务器地址为国内镜像站点。可以通过命令行工具 `nano` 或者其他文本编辑器完成此操作。 ```bash sudo nano /etc/apt/sources.list ``` 清空原有内容并加入阿里云提供的适用于 Ubuntu 9.04 (Jaunty Jackalope) 的镜像源列表[^1]: ```plaintext deb http://mirrors.aliyun.com/ubuntu-ports/ jaunty main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu-ports/ jaunty main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu-ports/ jaunty-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu-ports/ jaunty-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu-ports/ jaunty-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu-ports/ jaunty-backports main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu-ports/ jaunty-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu-ports/ jaunty-security main restricted universe multiverse ``` 保存更改后更新本地软件库索引以使新的设置生效。 ```bash sudo apt-get update ``` 需要注意的是,Ubuntu 9.3 是非常旧版本,并且官方已经停止支持多年。因此建议考虑升级至更现代稳定版以获得更好的安全性和兼容性保障。
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

xialliy

你的鼓励是我最大的支持!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值