MichaelBlog

double i = Double.MAX_VALUE; while(i == i + 1){ System.out.print ("学无止境");};

导航

Ubuntu Linux换源

Ubuntu Linux换源

1.打开终端
Ubuntu 的软件源配置文件是 /etc/apt/sources.list

cp /etc/apt/sources.list /etc/apt/sources.list.bak
//拷贝一下
vim /etc/apt/sources.list
//编辑源

2.选择你的Ubuntu版本,然后复制粘贴

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

最后更新一下,终端执行:
sudo apt-get update 或 apt-get upgrade

vim编辑保存退出

输入按 i;
推出按esc
普通保存退出:wq
强制保存:w !sudo tee % 命令原理

posted on 2022-04-16 09:48  Michael_chemic  阅读(98)  评论(0编辑  收藏  举报