给ubuntu linux 虚拟机换源

之前一直不太会换源,今天试了一下:

给ubuntu linux 虚拟机换源_第1张图片

当然,最后一行是错误的,应该是 apt-get update,然后我是退出了命令行进行的

 sudo apt-get upgrade

,源是用的中科大的源:

deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

,在打开source.list之后直接进行了粘贴(如果不行,i进入编辑模式),然后是esc退出编辑模式,:wq!保存退出。然后就是上述的命令了。

你可能感兴趣的:(给ubuntu linux 虚拟机换源)