Ubuntu19.04 在命令行中更换软件源到中科大
时间:2019-05-10 16:15 来源:linux.it.net.cn 作者:IT
1.首先我们备份原始配置文件,防止我们修改错误导致不必要的错误发生
sudo cp /etc/apt/sources.list /etc/apt/sourses.list.backup
然后我们编辑/etc/apt/sources.list
sudo vim /etc/apt/sources.list
如果你暂时不会使用vim并且是在ubuntu桌面环境下编辑的的情况下你可以使用一下命令
sudo gedit /etc/apt/sources.list
2.修改注释或删除掉源文件的源并添加如下地址并保存
deb https://mirrors.ustc.edu.cn/ubuntu/ disco main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ disco main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ disco-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ disco-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ disco-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ disco-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ disco-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ disco-backports main restricted universe multiverse
3.生效我们保存的软件源
sudo apt-get update
(责任编辑:IT)
1.首先我们备份原始配置文件,防止我们修改错误导致不必要的错误发生
sudo cp /etc/apt/sources.list /etc/apt/sourses.list.backup
然后我们编辑/etc/apt/sources.list
sudo vim /etc/apt/sources.list
如果你暂时不会使用vim并且是在ubuntu桌面环境下编辑的的情况下你可以使用一下命令
sudo gedit /etc/apt/sources.list
2.修改注释或删除掉源文件的源并添加如下地址并保存
deb https://mirrors.ustc.edu.cn/ubuntu/ disco main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ disco main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ disco-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ disco-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ disco-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ disco-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ disco-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ disco-backports main restricted universe multiverse
3.生效我们保存的软件源
sudo apt-get update
|