承接国内外服务器租用托管、定制开发、网站代运营、网站seo优化托管接单、网站代更新,新老站点皆可!!咨询QQ:3787320601

镜像:ubuntu在哪里修改镜像源

管理员 2023-04-09 07:56:45 互联网圈 68 ℃ 0 评论 2198字 收藏

ubuntu在哪里修改镜像源

ubuntu在sources.list文件中进行修改镜像源,修改方法:1、打开终端;2、输入“sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup”命令备份源列表;3、输入“sudo vim /etc/apt/sources.list”命令打开sources.list文件进行修改;4、使用新的源替换掉文件中所有的内容;5、输入命令更新源列表,使修改生效便可。

ubuntu在哪里修改镜像源

具体操作步骤:

1、使用快捷键【Ctrl+Alt+T】打开终端。

2、输入以下命令备份源列表。

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

3、再输入命令打开sources.list文件进行修改。

sudo vim /etc/apt/sources.list

4、使用以下源替换掉文件中所有的内容,保存编辑好的文件。

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

5、最后输入以下命令更新源列表,使修改生效便可。

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install build-essential

文章来源:丸子建站

文章标题:镜像:ubuntu在哪里修改镜像源

https://www.wanzijz.com/view/7192.html

TAG: ubuntu 镜像源
X

截屏,微信识别二维码

微信号:weimawl

(点击微信号复制,添加好友)

打开微信