zoukankan      html  css  js  c++  java
  • Ubuntu更换阿里源

    换源原因

    还用说吗,官方服务器在海外,速度太慢了。

    更换源步骤

    1.更改源文件的权限

    如果是以普通用户状态进入系统的,推荐先更改源文件的独写权限,这样子方便后续维护操作。

    sudo chmod 777 /etc/apt/sources.list
    

    2.更改源文件内容

    可以利用vim等编辑器进入sources.list之后禁用默认的源,直接在默认源之前加入#即可。 然后在sources.list里面添加以下内容(阿里云)

    deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    

    更新与升级

    sudo apt-get update
    
    sudo apt-get upgrade
    

    上面这两个命令的顺序尽量不要错,调换顺序的影响暂时不清楚,也不想尝试,麻烦。。

  • 相关阅读:
    javaEE(16)_Servlet监听器
    javaEE(15)_Servlet过滤器
    引用与指针的区别
    centos7 设置 查看 开机 启动项
    apache-httpd代理请求,selinux造成503问题的解决方法
    screen命令下,自启动设置
    PHP利用preg_split函数格式化日期
    PHP敏感信息脱敏函数
    php-sql-server-2017
    SQL Server修改表的模式schema
  • 原文地址:https://www.cnblogs.com/mirage-mc/p/12672696.html
Copyright © 2011-2022 走看看