From bb27178cfedc990f012592bf68f3be0ce2594bd6 Mon Sep 17 00:00:00 2001 From: Yann Lau Date: Sun, 1 Jun 2025 16:12:35 +0800 Subject: [PATCH] =?UTF-8?q?debian12=E6=BA=90=E6=9B=B4=E6=96=B0=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system_init/updata_source_debian12.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 system_init/updata_source_debian12.sh diff --git a/system_init/updata_source_debian12.sh b/system_init/updata_source_debian12.sh new file mode 100644 index 0000000..627b6ed --- /dev/null +++ b/system_init/updata_source_debian12.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# 备份原始 sources.list 文件 +cp /etc/apt/sources.list /etc/apt/sources.list.bak + +# 覆盖写入新的 sources.list 内容 +cat > /etc/apt/sources.list << EOF +deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib +deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib +deb https://mirrors.aliyun.com/debian-security/ bookworm-security main +deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main +deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib +deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib +deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib +deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib +EOF + +# 输出提示信息 +echo "sources.list 已更新,备份文件为 /etc/apt/sources.list.bak" \ No newline at end of file