1.刚装完系统什么都没有,上来先更新一手
admins@admin:~$ sudo apt-get update
admins@admin:~/桌面$ cd ~
admins@admin:~$ sudo apt-get update
[sudo] admins 的密码:
命中:1 http://cn.archive.ubuntu.com/ubuntu focal InRelease
获取:2 http://cn.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
获取:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
获取:4 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
获取:5 http://cn.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [278 kB]
获取:6 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [40.6 kB]
获取:7 http://cn.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [391 kB]
获取:8 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [77.5 kB]
获取:9 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2,464 B]
获取:10 http://cn.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [944 B]
获取:11 http://cn.archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [7,964 B]
获取:12 http://cn.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [30.5 kB]
已下载 1,165 kB,耗时 4秒 (317 kB/s)
正在读取软件包列表... 完成
admins@admin:~$ s
这里我们还是用的自带的镜像
然后去/etc/apt下找sources.list,先做个备份一会要修改它.
admins@admin:~$ cd /etc/apt
admins@admin:/etc/apt$ ls
apt.conf.d auth.conf.d preferences.d sources.list sources.list.d trusted.gpg.d
admins@admin:/etc/apt$ sudo cp sources.list sources.bak
admins@admin:/etc/apt$ ls
apt.conf.d auth.conf.d preferences.d sources.bak sources.list sources.list.d trusted.gpg.d
由于系统自带慢所以更换成国内镜像,为了下载快!!!节省时间!!!! 操作如下:
cd /etc/apt
这个目录下的sources.list文件
vim /etc/apt/sources.list
使用dd全部删除,然后添加阿里云的镜像地址
有桌面的可以用gedit 打开(类似记事本)
gedit sources.list ?
出现了警告不用管他,然后在更新一下 看看是不是阿里的镜像
?apt-get update
?都变了,结束!!!
下面是云镜象地址方便复制~~~
##阿里云的镜像
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
##腾讯云的镜像
deb http://mirrors.cloud.tencent.com/ubuntu/ bionic main universe restricted multiverse
deb http://mirrors.cloud.tencent.com/ubuntu/ bionic-security main universe restricted multiverse
deb http://mirrors.cloud.tencent.com/ubuntu/ bionic-updates main universe restricted multiverse
deb http://mirrors.cloud.tencent.com/ubuntu/ bionic-backports main universe restricted multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ bionic main universe restricted multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ bionic-security main universe restricted multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ bionic-updates main universe restricted multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ bionic-backports main universe restricted multiverse
|