欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

Ubuntu 7.10修改软件源的方法

程序员文章站 2022-05-21 11:42:00
安装好ubuntu 17.10后,我们发现使用apt-get 安装软件时特别慢,所以需要更换一下软件源。 方法: 1.备份自带源 sudo cp...

安装好ubuntu 17.10后,我们发现使用apt-get 安装软件时特别慢,所以需要更换一下软件源。

方法:

1.备份自带源

sudo cp /etc/apt/sources.list ~/sources.list.bak

2.修改源:

把以下内容贴到/etc/apt/sources.list文件中:

# deb cdrom:[ubuntu 17.04 _zesty zapus_ - release amd64 (20170412)]/ zesty main restricted

# see http://help.ubuntu.com/community/upgradenotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.aliyun.com/ubuntu/ artful main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty main restricted

## major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.aliyun.com/ubuntu/ artful-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty-updates main restricted

## n.b. software from this repository is entirely unsupported by the ubuntu
## team. also, please note that software in universe will not receive any
## review or updates from the ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu/ artful universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty universe
deb http://mirrors.aliyun.com/ubuntu/ artful-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty-updates universe

## n.b. software from this repository is entirely unsupported by the ubuntu 
## team, and may not be under a free licence. please satisfy yourself as to 
## your rights to use the software. also, please note that software in 
## multiverse will not receive any review or updates from the ubuntu
## security team.
deb http://mirrors.aliyun.com/ubuntu/ artful multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty multiverse
deb http://mirrors.aliyun.com/ubuntu/ artful-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty-updates multiverse

## n.b. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## also, please note that software in backports will not receive any review
## or updates from the ubuntu security team.
#deb http://mirrors.aliyun.com/ubuntu/ artful-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty-backports main restricted universe multiverse

## uncomment the following two lines to add software from canonical's
## 'partner' repository.
## this software is not part of ubuntu, but is offered by canonical and the
## respective vendors as a service to ubuntu users.
# deb http://archive.canonical.com/ubuntu zesty partner
# deb-src http://archive.canonical.com/ubuntu zesty partner# deb cdrom:[ubuntu 17.04 _zesty zapus_ - release amd64 (20170412)]/ zesty main restricted

# see http://help.ubuntu.com/community/upgradenotes for how to upgrade to
# newer versions of the distribution.
#deb http://mirrors.aliyun.com/ubuntu/ artful main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty main restricted

## major bug fix updates produced after the final release of the
## distribution.
#deb http://mirrors.aliyun.com/ubuntu/ artful-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty-updates main restricted

## n.b. software from this repository is entirely unsupported by the ubuntu
## team. also, please note that software in universe will not receive any
## review or updates from the ubuntu security team.
#deb http://mirrors.aliyun.com/ubuntu/ artful universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty universe
#deb http://mirrors.aliyun.com/ubuntu/ artful-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty-updates universe

## n.b. software from this repository is entirely unsupported by the ubuntu 
## team, and may not be under a free licence. please satisfy yourself as to 
## your rights to use the software. also, please note that software in 
## multiverse will not receive any review or updates from the ubuntu
## security team.
#deb http://mirrors.aliyun.com/ubuntu/ artful multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty multiverse
#deb http://mirrors.aliyun.com/ubuntu/ artful-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty-updates multiverse

## n.b. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## also, please note that software in backports will not receive any review
## or updates from the ubuntu security team.
#deb http://mirrors.aliyun.com/ubuntu/ artful-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ zesty-backports main restricted universe multiverse

## uncomment the following two lines to add software from canonical's
## 'partner' repository.
## this software is not part of ubuntu, but is offered by canonical and the
## respective vendors as a service to ubuntu users.
# deb http://archive.canonical.com/ubuntu zesty partner
# deb-src http://archive.canonical.com/ubuntu zesty partner

3.更新源

sudo apt-get update

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。