zoukankan      html  css  js  c++  java
  • linux更新源管理

    1.备份源

    主要防止在更新了新的源之后出现错误情况,备份一下现有的源

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.old
    

    2.编辑sources.list文件

    用vim编辑器编辑

    sudo vi sources.list
    

    先将原来文件内容全部删除,vim命令是dG

    3.添加源

    亲测阿里云的源非常好用

    # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
    deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
    deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
    deb http://mirrors.aliyun.com/ubuntu/ xenial universe
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
    deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
    deb http://archive.canonical.com/ubuntu xenial partner
    deb-src http://archive.canonical.com/ubuntu xenial partner
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
    

    4.更新

    sudo apt update
    
  • 相关阅读:
    开学第二周java作业暨动手动脑p1
    开学第一周
    暑假第九周
    暑假第八周
    bzoj4033:[HAOI2015]树上染色
    bzoj4472:[Jsoi2015]salesman
    dp专题复习
    bzoj1864:[Zjoi2006]三色二叉树
    bzoj1190:[HNOI2007]梦幻岛宝珠
    bzoj2794:[Poi2012]Cloakroom
  • 原文地址:https://www.cnblogs.com/daibigmonster/p/8304936.html
Copyright © 2011-2022 走看看