• Ubuntu18.04修改为阿里云


    对源安装时,要先知道系统的版本,以免安装错的版本

    使用命令:lsb_release -c

    备份原先的配置文件

    cd /etc/apt
    sudo cp sources.list sources.list.backup

    修改源文件的内容

    sudo vim sources.list    # 在 /etc/apt 目录下

    阿里源的源文件如下:

    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-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports 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
    将阿里源文件复制到 sources.list下,用vim的相应操作

    全部删除:按esc键后,先按gg(到达顶部),然后dG
    全部复制:按esc键后,先按gg,然后ggyG
    全选高亮显示:按esc键后,先按gg,然后ggvG或者ggVG

    单行复制:按esc键后, 然后yy
    单行删除:按esc键后, 然后dd
    粘贴:按esc键后, 然后p
    复制到粘贴板: 全选高亮显示之后,ctrl+shift+c

    参考:
    原文:https://blog.csdn.net/vivian_wanjin/article/details/82804884

    更新源

    sudo apt-get update

    更新软件

    sudo apt-get upgrade
  • 相关阅读:
    组合数学练习
    floyd算法新理解
    图论练习
    GDOI2021 day2总结
    P3190 [HNOI2007]神奇游乐园
    P1932 A+B A-B A*B A/B A%B Problem
    P2289 [HNOI2004]邮递员
    P5056 【模板】插头dp
    P4323 [JSOI2016]独特的树叶
    CF1153D Serval and Rooted Tree
  • 原文地址:https://www.cnblogs.com/zgqcn/p/10734881.html
Copyright © 2020-2023  润新知