zoukankan      html  css  js  c++  java
  • Ubuntu18.04换源



    引用:https://blog.csdn.net/u012308586/article/details/102953882



    第一步、sudo  cp   /etc/apt/sources.list   /etc/apt/sources.list.bak 备份

      文件里内容大概是这样:

        



    第二步、修改源文件source.list

      1. 终端执行命令:sudo  chmod  777  /etc/apt/sources.list更改文件权限使其可编辑;
      2. 执行命令:sudo  gedit   /etc/apt/sources.list打开文件进行编辑;
      3. 删除原来的文件内容,复制下面的任意一个到其中并保存(常用的是阿里源和清华源,推荐阿里源);

      阿里源:

     1 deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
     2 
     3 deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
     4 
     5 deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
     6 
     7 deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
     8 
     9 deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    10 
    11 deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    12 
    13 deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    14 
    15 deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    16 
    17 deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    18 
    19 deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

      清华源:

     1 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
     2 
     3 deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
     4 
     5 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
     6 
     7 deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
     8 
     9 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
    10 
    11 deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
    12 
    13 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
    14 
    15 deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
    16 
    17 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
    18 
    19 deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

      163源:

     1 deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
     2 
     3 deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
     4 
     5 deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
     6 
     7 deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
     8 
     9 deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
    10 
    11 deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
    12 
    13 deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
    14 
    15 deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
    16 
    17 deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
    18 
    19 deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse


    第三步、更新源

      终端执行命令:sudo apt update更新软件列表,换源完成。



  • 相关阅读:
    printf里的=、++
    线程也疯狂-----异步编程
    自己搭建node服务器环境(请求静态资源、get请求、post请求)
    React学习
    2020.10-2021-01总结
    接圈的作用和缺点
    CWnd,HWND; CDC,HDC
    Python通过requests模块处理form-data请求格式
    element-ui resetFields 无效的问题
    用python 将数字每三组分割
  • 原文地址:https://www.cnblogs.com/zhaipanger/p/12805955.html
Copyright © 2011-2022 走看看