diff --git a/ubuntu-sources-22.04.md b/ubuntu-sources-22.04.md new file mode 100644 index 0000000..82bcf94 --- /dev/null +++ b/ubuntu-sources-22.04.md @@ -0,0 +1,35 @@ +备份 source.list 文件 +``` +cp /etc/apt/sources.list /etc/apt/sources.list.bak +``` +``` +vim /etc/apt/sources.list +``` + +复制粘贴 +``` +deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse +``` + +更新 +``` +apt update +``` + +升级现有软件包(可选) +``` +apt upgrade +``` + +修改 PPA 和第三方源(如果有的话) +``` +/etc/apt/sources.list.d/ +``` + +替换 ppa 文件的URL,一般将 ppa.launchpad.net 修改为 ppa.mirrors.aliyun.com +``` +deb http://ppa.mirrors.aliyun.com/ppa/username/repositoryname/ jammy main +``` \ No newline at end of file