时间:2021-05-19
安装好ubuntu 17.10后,我们发现使用apt-get 安装软件时特别慢,所以需要更换一下软件源。
方法:
1.备份自带源
sudo cp /etc/apt/sources.list ~/sources.list.bak2.修改源:
把以下内容贴到/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 universedeb 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 multiversedeb 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 partner3.更新源
sudo apt-get update以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
环境:Ubuntu16.04以下命令若无加粗备注说明在本地计算机操作,则都是在服务器端操作1修改Ubuntu软件源Ubuntu安装好之后,安装软件源的服务器地址
首先修改源echo'debhttp://Ubuntu.cn99.com/ubuntu/intrepidmainrestricted'|sudotee-a/etc
手动修改Ubuntu的apt-get源1、用ssh工具连接到Ubuntu(我用的xshell)2、命令行敲入cd/etc/apt/3、备份此目录下的source
对于刚刚接触Ubuntu的朋友来说可能对软件的安装及更新方式还不太了解,其实Ubuntu除了通过deb软件包,软件中心外还可以通过添加软件源PPA的方式来进行软
1.备份源列表Ubuntu缺省的配置的源并不是国内的服务器,下载更新软件都比较慢,本文介绍如何设置源列表,选择比较快的源以节省下载时间。#首先备份源列表sudo