ubuntu基础配置(慢慢更新)

壹.更换国内源:

安装Ubuntu 后,使用国外源速度很慢,修改为国内源会快很多,修改阿里源为Ubuntu 18.04默认的源。

1.备份sources.list     #防止修改错误导致无法使用

    cp /etc/apt/sources.list /etc/apt/sources.list.bak

2.在sources.list中添加阿里源

    vim /etc/apt/sources.list        #编辑sources.list,按下i切换插入模式

    复制以下

        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

    将刚复制的文本粘贴到sourcure.list中

3.更新源

    sudo apt-get update    #这个命令,会访问源列表里的每个网址,并读取软件列表,然后保存在本地电脑。我们在新立得软件包管理器里看到的软件列表,都是通过update命令更新的。

     sudo apt-get upgrade    #这个命令,会把本地已安装的软件,与刚下载的软件列表里对应软件进行对比,如果发现已安装的软件版本太低,就会提示你更新。如果你的软件都是最新版本,会提示:升级了 x 个软件包,新安装了 x 个软件包,要卸载 x 个软件包,有 x 个软件包未被升级。总而言之,update是更新软件列表,upgrade是更新软件。

你可能感兴趣的:(ubuntu基础配置(慢慢更新))