ubuntu 22.04国内镜像阿里云/163源/清华大学/中科大

linux

Ubuntu 22.04 LTS这是一个长期支持版本,它将被支持五年,直到2027年4月。已发布的LTS版本带来了一些新的功能。如果你正在使用Ubuntu 20.04 LTS,你会注意到许多视觉上的变化。

当然作为国内用户首要任务安装完成之后首要任务就是更改ubuntu 22.04的镜像/软件源。

国内有很多Ubuntu 22.04的镜像源,包括阿里、网易,还有很多教育网的镜像源,比如清华源、中科大源。

在教程中我们将介绍如何更改镜像在ubuntu 22.04。国内的包括有镜像阿里云/163源/清华大学/中科大。

首先我们需要先备份Ubuntu官方的软件源,执行以下命令将备份原来的软件源。

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak

清华大学镜像

复制以下命令即可一键切换到清华大学ubuntu 22.04镜像:

sudo bash -c "cat << EOF > /etc/apt/sources.list && apt update 

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

EOF"

163镜像

复制以下命令即可一键切换到163 ubuntu 22.04镜像:

sudo bash -c "cat << EOF > /etc/apt/sources.list && apt update 

deb http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse

EOF"

阿里云镜像

复制以下命令即可一键切换到阿里云 ubuntu 22.04镜像:

sudo bash -c "cat << EOF > /etc/apt/sources.list && apt update 

deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

EOF"

中科大镜像

复制以下命令即可一键切换到中科大ubuntu 22.04镜像:

sudo bash -c "cat << EOF > /etc/apt/sources.list && apt update 

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

EOF"

结论

至此,我们知道了如何更改Ubuntu 20.04软件源,使得我们安装软件变得更快。如有以为请发表评论

以上是 ubuntu 22.04国内镜像阿里云/163源/清华大学/中科大 的全部内容, 来源链接: utcz.com/z/507775.html

回到顶部