Ubantu1804更换阿里源

修改阿里源为Ubuntu 18.04默认的源

//备份/etc/apt/sources.list
//备份
#]cp  /etc/apt/sources.list   /etc/apt/sources.list.bak

//在/etc/apt/sources.list文件前面添加如下条目(原有源url可注释掉)
//添加阿里源
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

 

//apt-get三个重要命令

 

#]apt-get  update        //更新软件源中的所有软件列表。 

#]apt-get  upgrade     //更新软件。 

#]apt-get  dist-upgrade   //更新系统版本。如果你对新版本软件的需求不是那么迫切,可以不执行

 

posted @ 2020-07-21 09:58  入戏的小白  阅读(1476)  评论(0编辑  收藏  举报