Ubuntu 7.10修改软件源的方法

安装好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

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

(0)

相关推荐

  • Shell脚本实现自动检测修改最快的Ubuntu软件源

    每次装好Ubuntu,对于大多数用户来说,首先要做的事就是手动修改/etc/apt/sources.list文件,将里面的官方软件源地址更换为自己学校或者公司的软件源.当我们更换一个工作环境后,可能伴随着又要替换旧的软件源地址. 笔者觉得这样每次手动更改软件源是一件及其麻烦重复的劳动,于是编写了一个自动更新最快软件源的脚本,从此一劳永逸. 原理 最直观的想法就是:对各个软件源进行测速,选出最快的那个,之后将其替换为新的软件源. 那么如何对各个软件源测速呢?有两种方法: 一.用ping命令 测量其

  • Ubuntu 7.10修改软件源的方法

    安装好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

  • Ubuntu 20.04换阿里源的方法

    注意,这篇文章其实不是简单的教你怎么换成20.04的源,而是教你一种基于20.04的方法来换源. 笔者在写这篇文章的时候,20.04 还没有release出来正式版,但是已经可以在仓库里看到有源存在了,故写下这篇文章. 请注意:Ubuntu 20.04 已于4月23日发布正式版本. 请注意:发现有些软件比如ckermit,仓库里还没有,升级及换源自行斟酌. 1 备份原来的源 cp -ra /etc/apt/sources.list /etc/apt/sources.list.bak 2 搞清楚u

  • Python的包管理器pip更换软件源的方法详解

    pip镜像源 在国内如果不使用 VPN 是没办法好好使用 pip 命令安装任何 Python 包的.所以另一个选择就是使用国内各大厂的开源镜像源. 目前国内靠谱的 pip 镜像源有: 清华: https://pypi.tuna.tsinghua.edu.cn/simple 豆瓣: http://pypi.douban.com/simple/ 阿里: http://mirrors.aliyun.com/pypi/simple/ 在 pip 命令中使用镜像源很简单,在执行 install 命令时,使

  • python中pip的使用和修改下载源的方法

    基本命令 显示版本信息 pip -V 安装指定包 pip install <packages> pip install -i 'host' <packages> 指定下载源 卸载指定包 pip uninstall <packages> 列出已安装的包 pip list 显示有关已安装包的信息 pip show <packages> 查找指定包 pip search 修改下载源 Linux vim ~/.pip/pip.conf #编辑用户目录下隐藏的配置文件

  • Ubuntu 18.04更换apt-get源的方法

    使用apt-get安装时,会很慢,更换了国内的源后,就可以解决这个问题了. 1. 备份sources.list文件 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 2. 打开sources.list文件 sudo gedit /etc/apt/sources.list 3. 删除原内容,添加下列内容 #清华源 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main r

  • Ubuntu 11.10 安装Node.js的方法

    1.安装依赖包 复制代码 代码如下: sudo apt-get install g++ curl libssl-dev apache2-utils sudo apt-get install git-core 2.下载源代码 复制代码 代码如下: git clone git://github.com/ry/node.git 这一步是因网络状况较差一直显示 Cloning to node... 可以从官网上直接下载源代码,解压到帐号的文件夹里. 文件名改为了node. 3.编译 三句命令: 复制代码

  • pip/anaconda修改镜像源,加快python模块安装速度的操作

    修改镜像源的原因是pip和conda默认国外镜像源,所以每次安装模块pip install ×××或者 conda install ×××的时候非常慢. 所以,切换到国内的镜像源会显著加快模块安装速度. pip和conda修改镜像源的方式有所不同,网上有大量教程,我把这些教程总结到一起. pip修改镜像源 国内源: 新版ubuntu要求使用https源,要注意. 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliy

  • Ubuntu Server 10.04修改Apache的默认目录的方法

    在Ubuntu Server 10.04中默认由apt方式安装的Apache,指定网页主目录位于:/var/www.而我需要将其更改为: /home/www.因为我的系统/var所分到的空间太少,而我又有提供通过web方式提供网络存储的需要.比较糟糕的是:我的/etc /apache2/sites-enabled/000-default文件在修改后消失掉了.结果导致apache服务出现错误,网站不能运行了.在最后一部分我记录了如何解决这个问题. 一.查找Apache的配置文件 # cd /etc

  • Ubuntu 14.04 更换阿里云源的方法

    下面给大家分享Ubuntu 14.04 更换阿里云源的方法,具体内容介绍如下所示: sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份 sudo vim /etc/apt/sources.list #修改 sudo apt-get update #更新列表 阿里云源 deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse d

随机推荐