一、为ubuntu20.04更新源
-
给root用户设置密码:命令:
sudo passwd root
-
备份原来的源,命令:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
-
安装vim,命令:
sudo apt install vim
-
修改/etc/apt/sources.list文件,命令:
sudo vim /etc/apt/sources.list
,将里面的内容全删后,配置为清华源,清华源如下: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 ht