Ubuntu更换成国内的源

登录root用户

su


#先备份原来的源列表文件
mv /etc/apt/sources.list /etc/apt/sourses.list.backup

#新建源列表文件
vim /etc/apt/sources.list


#加入源地址(推荐用阿里云源)
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb 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 main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse


#更新软件列表
sudo apt-get update

#更新软件(把已安装的软件与刚刷新的软件列表中的版本进行对比,如果发现已安装的软件版本太低,就会提示更新)
sudo apt-get upgrade

 

Ubuntu更换成国内的源

上一篇:使用sestatus命令来查看SELinux的当前状态


下一篇:Tomcat 后台war包getshell