1.輸入該命令按回車(chē)鍵拷貝源文件進(jìn)行備份:cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.輸入該命令按回車(chē)鍵:vi /etc/apt/sources.list
3.按i進(jìn)入插入模式,將文件內(nèi)容修改為如下內(nèi)容,然后按ESC鍵輸入wq按回車(chē)鍵保存退出vi編輯
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-proposed main restricted universe multiverse
\# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed 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
4.輸入該命令按回車(chē)鍵更新列表:apt-get update