linux如何更换软件源

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

linux如何更换软件源

具体操作步骤:

1、在linux系统桌面中使用快捷键【Ctrl+Alt+T】打开linux终端命令行模式。

2、在linux终端命令行中输入以下命令备份一下源列表。

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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐