linux修改apt-get 源

Posted zpc

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux修改apt-get 源相关的知识,希望对你有一定的参考价值。

  1. cd /etc/apt/

  2. cp sources.list sources.list.bak

  3. sudo vi sources.list

  4. 清空或者注释掉以前的

  5. 粘贴 一下内容

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
?
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
  1. sudo apt-get update

  2. sudo apt-get upgrade

sudo apt-get install vim

以上是关于linux修改apt-get 源的主要内容,如果未能解决你的问题,请参考以下文章

debian linux的apt-get如何使用,请具体点,或以实例来说明

apt-get的啥是apt-get

apt-get

apt-get install 与 make install 的区别 linux

在debian下用apt-get install zeroc-ice33 安装了ice,如何修改安装路径?

Docker进入容器修改配置文件