原文章:https://blog.csdn.net/qq_23835707/article/details/111629344
1.備份原來的源,將以前的源備份一下,以防以后可以用的。
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.打開/etc/apt/sources.list文件,在前面添加如下條目,並保存。
sudo vim /etc/apt/sources.list
3.摁 i 進入插入模式
4.然后摁 鍵盤的 delete 刪除原有的源
5.把下面的清華源復制,然后右鍵粘貼
#添加清華源
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 multiverse
6.先摁 Esc 退出插入模式,再按住shift鍵,並連按兩次z字符,即可保存剛才的編輯並退出vim編輯狀態!!!
————————————————
版權聲明:本文為CSDN博主「真正的張起靈」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/qq_23835707/article/details/111629344
