diff --git a/ChangeMirrors.sh b/ChangeMirrors.sh
index 1b9f704..6c9e5bb 100755
--- a/ChangeMirrors.sh
+++ b/ChangeMirrors.sh
@@ -632,13 +632,14 @@ function run_end() {
return
fi
local sponsor_ad=(
- "🔥 1Panel · Linux 面板|极简运维 ➜ https://1panel.cn \033[3;2m【广告】\033[0m"
- "🔥 林枫云 · 专注独立IP高频VPS|R9/i9系列定制 ➜ https://www.dkdun.cn \033[3;2m【广告】\033[0m"
- "🔥 乔星欢 · 香港4核4G服务器28元起_香港500Mbps大带宽 ➜ https://www.qiaoxh.com \033[3;2m【广告】\033[0m"
+ "🔥 1Panel · Linux 面板|极简运维 ➜ https://1panel.cn"
+ "🔥 林枫云 · 专注独立IP高频VPS|R9/i9系列定制 ➜ https://www.dkdun.cn"
+ "🔥 乔星欢 · 香港4核4G服务器28元起_香港500Mbps大带宽 ➜ https://www.qiaoxh.com"
+ "🔥 速拓云 · 国内高防云服务器新用户享5折优惠 ➜ https://www.sutuoyun.com"
)
echo -e "\n✨ 脚本运行完毕,更多使用教程详见官网 👉 \033[3mhttps://linuxmirrors.cn\033[0m\n"
for ad in "${sponsor_ad[@]}"; do
- echo -e " ${ad}"
+ echo -e " ${ad} \033[3;2m【广告】\033[0m"
done
echo -e "\n\033[3;1mPowered by \033[34mLinuxMirrors\033[0m\n"
}
diff --git a/DockerInstallation.sh b/DockerInstallation.sh
index 35d54df..db0a343 100755
--- a/DockerInstallation.sh
+++ b/DockerInstallation.sh
@@ -341,13 +341,14 @@ function run_end() {
return
fi
local sponsor_ad=(
- "🔥 1Panel · Linux 面板|极简运维 ➜ https://1panel.cn \033[3;2m【广告】\033[0m"
- "🔥 林枫云 · 专注独立IP高频VPS|R9/i9系列定制 ➜ https://www.dkdun.cn \033[3;2m【广告】\033[0m"
- "🔥 乔星欢 · 香港4核4G服务器28元起_香港500Mbps大带宽 ➜ https://www.qiaoxh.com \033[3;2m【广告】\033[0m"
+ "🔥 1Panel · Linux 面板|极简运维 ➜ https://1panel.cn"
+ "🔥 林枫云 · 专注独立IP高频VPS|R9/i9系列定制 ➜ https://www.dkdun.cn"
+ "🔥 乔星欢 · 香港4核4G服务器28元起_香港500Mbps大带宽 ➜ https://www.qiaoxh.com"
+ "🔥 速拓云 · 国内高防云服务器新用户享5折优惠 ➜ https://www.sutuoyun.com"
)
echo -e "\n✨ 脚本运行完毕,更多使用教程详见官网 👉 \033[3mhttps://linuxmirrors.cn\033[0m\n"
for ad in "${sponsor_ad[@]}"; do
- echo -e " ${ad}"
+ echo -e " ${ad} \033[3;2m【广告】\033[0m"
done
echo -e "\n\033[3;1mPowered by \033[34mLinuxMirrors\033[0m\n"
}
diff --git a/docs/assets/images/sponsor/sutuoyun.svg b/docs/assets/images/sponsor/sutuoyun.svg
new file mode 100644
index 0000000..91963d1
--- /dev/null
+++ b/docs/assets/images/sponsor/sutuoyun.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docs/sponsor/main.html b/docs/sponsor/main.html
index b4087ba..8b344ac 100644
--- a/docs/sponsor/main.html
+++ b/docs/sponsor/main.html
@@ -14,6 +14,9 @@
+
+
+
diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css
index c89d150..11be6db 100644
--- a/docs/stylesheets/extra.css
+++ b/docs/stylesheets/extra.css
@@ -1,288 +1,298 @@
-:root {
- --md-text-font: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Segoe UI', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
- --md-code-font: 'SF Mono';
- --md-primary-fg-color--light: hsl(0, 0%, 100%, 0.33);
- --md-default-bg-color--light: #ffffff;
- --md-default-bg-color--dark: hsla(var(--md-hue), 15%, 14%, 1);
- --view-transition-z-index-foreground: 999;
- --view-transition-z-index-background: 1;
- --hero-background-image: linear-gradient(90deg, rgba(177, 177, 177, 1) 50%, rgba(177, 177, 177, 1) 50%);
-}
-
-[data-md-color-scheme='slate'] {
- --hero-background-image: linear-gradient(90deg, rgba(147, 147, 147, 1) 50%, rgba(147, 147, 147, 1) 50%);
-}
-
-[data-md-color-primary=white] {
- --md-typeset-a-color: #2080f0;
-}
-
-[data-md-color-scheme='slate'][data-md-color-primary=black] {
- --md-typeset-a-color: #2080f0;
-}
-
-.md-typeset .admonition.tip,
-.md-typeset details.tip {
- border-color: #009400;
-}
-
-.md-typeset .tip>.admonition-title,
-.md-typeset .tip>summary {
- background-color: #0094001a;
-}
-
-[data-md-color-scheme="slate"] .md-typeset .admonition.quote,
-.md-typeset details.quote {
- border-color: hsla(225deg, 15%, 90%, 0.24);
-}
-
-.md-header {
- background-color: hsla(240, 9%, 75%, 0.33);
- -webkit-backdrop-filter: blur(8px);
- backdrop-filter: blur(8px);
- z-index: 999 !important;
-}
-
-[data-md-color-scheme='slate'] .md-header {
- background-color: hsla(var(--md-hue), 15%, 9%, 0.33);
-}
-
-.md-tabs {
- background-color: hsla(240, 9%, 75%, 0.33);
-}
-
-[data-md-color-scheme='slate'] .md-tabs {
- background-color: hsla(var(--md-hue), 15%, 9%, 0.33);
-}
-
-[data-md-color-scheme="default"] .md-logo img {
- content: url(/assets/images/brand/svg/logo-light.svg);
-}
-
-[data-md-color-scheme="slate"] .md-logo img {
- content: url(/assets/images/brand/svg/logo-dark.svg);
-}
-
-@font-face {
- font-family: 'SF Mono';
- src: url('./fonts/SF-Mono-Regular.otf');
-}
-
-@keyframes heart {
-
- 0%,
- 40%,
- 80%,
- 100% {
- transform: scale(1);
- }
-
- 20%,
- 60% {
- transform: scale(1.15);
- }
-}
-
-.home-cmd pre>code {
- padding-right: 3em;
-}
-
-.heart {
- animation: heart 1000ms infinite;
-}
-
-.md-tabs__link {
- font-size: 0.8rem !important;
- font-weight: 600 !important;
-}
-
-.md-typeset {
- font-size: 16px;
-}
-
-.md-typeset .emojione,
-.md-typeset .gemoji,
-.md-typeset .twemoji {
- height: 100%;
- vertical-align: -0.2em !important;
-}
-
-.md-typeset .middle {
- vertical-align: -0.35em !important;
-}
-
-/* 赞助组件 */
-.sponsor {
- padding-top: 1rem;
- margin-top: 0;
- border-top: none;
-}
-
-.sponsor-toc {
- margin-top: 2rem !important;
- border-top: 1px solid var(--md-default-fg-color--lightest) !important;
-}
-
-.sponsor .sponsor-label {
- font-size: 0.8rem;
- text-align: center;
- margin-bottom: 0.2rem;
- color: var(--md-default-fg-color);
-}
-
-.sponsor .sponsor-wrapper {
- width: 100%;
- padding: 0.5rem 0;
-}
-
-.sponsor .sponsor-item {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- text-align: center;
- padding: 1rem;
- border-radius: 5px;
- transition: background-color 0.2s;
- height: 80px;
- max-height: 80px;
-}
-
-.sponsor-item-toc {
- margin: 0;
- padding: 14px !important;
- height: 66px !important;
- box-sizing: border-box;
-}
-
-.sponsor .sponsor-item:hover {
- background-color: var(--md-code-bg-color);
-}
-
-.sponsor .sponsor-item img {
- max-width: 100%;
- height: auto;
- vertical-align: middle;
-}
-
-.sponsor-item-toc img {
- width: 50% !important;
-}
-
-.sponsor-flex-wrapper {
- display: flex;
- flex-wrap: wrap;
- gap: 1rem;
- justify-content: center;
-}
-
-.sponsor-flex-wrapper-toc {
- display: flex !important;
- flex-direction: column;
- gap: 8px !important;
- padding: 0;
- width: 100%;
-}
-
-.sponsor-flex-item {
- flex: 0 1 calc(33.33% - 1rem);
- min-width: 200px;
- max-width: 300px;
-}
-
-.sponsor-flex-item img {
- width: 60% !important;
-}
-
-@media screen and (max-width: 768px) {
- .sponsor-flex-item {
- flex: 0 1 calc(50% - 1rem);
- min-width: 150px;
- max-width: calc(50% - 1rem);
- }
-}
-
-@media screen and (max-width: 480px) {
- .sponsor .sponsor-item {
- padding: 0;
- height: 40px;
- }
-}
-
-@media screen and (max-width: 768px) {
- .sponsor-toc {
- display: none;
- }
-}
-
-/* TDesign 组件相关 */
-.t-tag .t-icon {
- margin-right: 0 !important;
-}
-
-[theme-mode="dark"] .t-table {
- --td-bg-color-container: hsla(var(--md-hue), 15%, 14%, 1) !important;
- --td-component-border: hsla(225deg, 15%, 95%, 0.12) !important;
-}
-
-[theme-mode="dark"] .t-tag {
- --td-warning-color-light: #cf6e2d48 !important;
-}
-
-.t-table--hoverable tbody tr:hover {
- background-color: rgba(0, 0, 0, 0.016) !important;
-}
-
-[theme-mode="dark"] .t-table--hoverable tbody tr:hover {
- background-color: rgba(240, 241, 244, 0.016) !important;
-}
-
-/* termynal 插件 */
-.termy {
- padding: 65px 25px 35px !important;
-}
-
-[data-termynal] {
- color: #000 !important;
- background: #e6e6e6 !important;
-}
-
-[data-md-color-scheme="slate"] [data-termynal] {
- color: #eeeeee !important;
- background: #252a33 !important;
-}
-
-button[data-terminal-control] {
- color: var(--md-typeset-a-color) !important;
-}
-
-[data-termynal]:after {
- color: #585858 !important;
-}
-
-[data-md-color-scheme="slate"] [data-termynal]:after {
- color: #a2a2a2 !important;
-}
-
-/* 切换主题动画 */
-::view-transition-old(root),
-::view-transition-new(root) {
- animation: none;
- mix-blend-mode: normal;
-}
-
-.dark::view-transition-old(root) {
- z-index: var(--view-transition-z-index-foreground);
-}
-
-.dark::view-transition-new(root) {
- z-index: var(--view-transition-z-index-background);
-}
-
-::view-transition-old(root) {
- z-index: var(--view-transition-z-index-background)
-}
-
-::view-transition-new(root) {
- z-index: var(--view-transition-z-index-foreground);
+:root {
+ --md-text-font: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Segoe UI', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
+ --md-code-font: 'SF Mono';
+ --md-primary-fg-color--light: hsl(0, 0%, 100%, 0.33);
+ --md-default-bg-color--light: #ffffff;
+ --md-default-bg-color--dark: hsla(var(--md-hue), 15%, 14%, 1);
+ --view-transition-z-index-foreground: 999;
+ --view-transition-z-index-background: 1;
+ --hero-background-image: linear-gradient(90deg, rgb(90 90 90) 50%, rgb(90 90 90) 50%);
+}
+
+[data-md-color-scheme='slate'] {
+ --hero-background-image: linear-gradient(90deg, rgb(114 114 114) 50%, rgb(114 114 114) 50%);
+}
+
+[data-md-color-primary=white] {
+ --md-typeset-a-color: #2080f0;
+}
+
+[data-md-color-scheme='slate'][data-md-color-primary=black] {
+ --md-typeset-a-color: #2080f0;
+}
+
+.md-typeset .admonition.tip,
+.md-typeset details.tip {
+ border-color: #009400;
+}
+
+.md-typeset .tip>.admonition-title,
+.md-typeset .tip>summary {
+ background-color: #0094001a;
+}
+
+[data-md-color-scheme="slate"] .md-typeset .admonition.quote,
+.md-typeset details.quote {
+ border-color: hsla(225deg, 15%, 90%, 0.24);
+}
+
+.md-header {
+ background-color: hsla(240, 9%, 75%, 0.33);
+ -webkit-backdrop-filter: blur(8px);
+ backdrop-filter: blur(8px);
+ z-index: 999 !important;
+}
+
+[data-md-color-scheme='slate'] .md-header {
+ background-color: hsla(var(--md-hue), 15%, 9%, 0.33);
+}
+
+.md-tabs {
+ background-color: hsla(240, 9%, 75%, 0.33);
+}
+
+[data-md-color-scheme='slate'] .md-tabs {
+ background-color: hsla(var(--md-hue), 15%, 9%, 0.33);
+}
+
+[data-md-color-scheme="default"] .md-logo img {
+ content: url(/assets/images/brand/svg/logo-light.svg);
+}
+
+[data-md-color-scheme="slate"] .md-logo img {
+ content: url(/assets/images/brand/svg/logo-dark.svg);
+}
+
+@media screen and (max-width: 768px) {
+ .md-typeset .admonition .tabbed-set {
+ width: calc(100vw - 3rem - 2px);
+ }
+ .md-typeset .admonition .tabbed-labels {
+ width: calc(100vw - 3rem - 1.2rem);
+ padding-left: .6rem;
+ }
+}
+
+@font-face {
+ font-family: 'SF Mono';
+ src: url('./fonts/SF-Mono-Regular.otf');
+}
+
+@keyframes heart {
+
+ 0%,
+ 40%,
+ 80%,
+ 100% {
+ transform: scale(1);
+ }
+
+ 20%,
+ 60% {
+ transform: scale(1.15);
+ }
+}
+
+.home-cmd pre>code {
+ padding-right: 3em;
+}
+
+.heart {
+ animation: heart 1000ms infinite;
+}
+
+.md-tabs__link {
+ font-size: 0.8rem !important;
+ font-weight: 600 !important;
+}
+
+.md-typeset {
+ font-size: 16px;
+}
+
+.md-typeset .emojione,
+.md-typeset .gemoji,
+.md-typeset .twemoji {
+ height: 100%;
+ vertical-align: -0.2em !important;
+}
+
+.md-typeset .middle {
+ vertical-align: -0.35em !important;
+}
+
+/* 赞助组件 */
+.sponsor {
+ padding-top: 1rem;
+ margin-top: 0;
+ border-top: none;
+}
+
+.sponsor-toc {
+ margin-top: 2rem !important;
+ border-top: 1px solid var(--md-default-fg-color--lightest) !important;
+}
+
+.sponsor .sponsor-label {
+ font-size: 0.8rem;
+ text-align: center;
+ margin-bottom: 0.2rem;
+ color: var(--md-default-fg-color);
+}
+
+.sponsor .sponsor-wrapper {
+ width: 100%;
+ padding: 0.5rem 0;
+}
+
+.sponsor .sponsor-item {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ text-align: center;
+ padding: 1rem;
+ border-radius: 5px;
+ transition: background-color 0.2s;
+ height: 80px;
+ max-height: 80px;
+}
+
+.sponsor-item-toc {
+ margin: 0;
+ padding: 14px !important;
+ height: 66px !important;
+ box-sizing: border-box;
+}
+
+.sponsor .sponsor-item:hover {
+ background-color: var(--md-code-bg-color);
+}
+
+.sponsor .sponsor-item img {
+ max-width: 100%;
+ height: auto;
+ vertical-align: middle;
+}
+
+.sponsor-item-toc img {
+ width: 50% !important;
+}
+
+.sponsor-flex-wrapper {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 1rem;
+ justify-content: center;
+}
+
+.sponsor-flex-wrapper-toc {
+ display: flex !important;
+ flex-direction: column;
+ gap: 8px !important;
+ padding: 0;
+ width: 100%;
+}
+
+.sponsor-flex-item {
+ flex: 0 1 calc(33.33% - 1rem);
+ min-width: 200px;
+ max-width: 300px;
+}
+
+.sponsor-flex-item img {
+ width: 60% !important;
+}
+
+@media screen and (max-width: 768px) {
+ .sponsor-flex-item {
+ flex: 0 1 calc(50% - 1rem);
+ min-width: 150px;
+ max-width: calc(50% - 1rem);
+ }
+}
+
+@media screen and (max-width: 480px) {
+ .sponsor .sponsor-item {
+ padding: 0;
+ height: 40px;
+ }
+}
+
+@media screen and (max-width: 768px) {
+ .sponsor-toc {
+ display: none;
+ }
+}
+
+/* TDesign 组件相关 */
+.t-tag .t-icon {
+ margin-right: 0 !important;
+}
+
+[theme-mode="dark"] .t-table {
+ --td-bg-color-container: hsla(var(--md-hue), 15%, 14%, 1) !important;
+ --td-component-border: hsla(225deg, 15%, 95%, 0.12) !important;
+}
+
+[theme-mode="dark"] .t-tag {
+ --td-warning-color-light: #cf6e2d48 !important;
+}
+
+.t-table--hoverable tbody tr:hover {
+ background-color: rgba(0, 0, 0, 0.016) !important;
+}
+
+[theme-mode="dark"] .t-table--hoverable tbody tr:hover {
+ background-color: rgba(240, 241, 244, 0.016) !important;
+}
+
+/* termynal 插件 */
+.termy {
+ padding: 65px 25px 35px !important;
+}
+
+[data-termynal] {
+ color: #000 !important;
+ background: #e6e6e6 !important;
+}
+
+[data-md-color-scheme="slate"] [data-termynal] {
+ color: #eeeeee !important;
+ background: #252a33 !important;
+}
+
+button[data-terminal-control] {
+ color: var(--md-typeset-a-color) !important;
+}
+
+[data-termynal]:after {
+ color: #585858 !important;
+}
+
+[data-md-color-scheme="slate"] [data-termynal]:after {
+ color: #a2a2a2 !important;
+}
+
+/* 切换主题动画 */
+::view-transition-old(root),
+::view-transition-new(root) {
+ animation: none;
+ mix-blend-mode: normal;
+}
+
+.dark::view-transition-old(root) {
+ z-index: var(--view-transition-z-index-foreground);
+}
+
+.dark::view-transition-new(root) {
+ z-index: var(--view-transition-z-index-background);
+}
+
+::view-transition-old(root) {
+ z-index: var(--view-transition-z-index-background)
+}
+
+::view-transition-new(root) {
+ z-index: var(--view-transition-z-index-foreground);
}
\ No newline at end of file
diff --git a/docs/theme/partials/toc.html b/docs/theme/partials/toc.html
index cf61ed2..c6afe0f 100644
--- a/docs/theme/partials/toc.html
+++ b/docs/theme/partials/toc.html
@@ -25,9 +25,12 @@
+
+
+
-
-
+
+
-```
-$ bash ChangeMirrors.sh --help
-
-命令选项(名称/含义/值):
-
- --abroad 使用境外以及海外软件源 无
- --edu 使用中国大陆教育网软件源 无
- --source 指定软件源地址(域名或IP) 地址
- --source-epel 指定 EPEL 附加软件包仓库的软件源地址(域名或IP) 地址
- --source-security 指定 Debian 系统 security 仓库的软件源地址(域名或IP) 地址
- --source-vault 指定 CentOS / AlmaLinux 系统 vault 仓库的软件源地址(域名或IP) 地址
- --source-portage 指定 Gentoo 系统 portage 仓库的软件源地址(域名或IP) 地址
- --source-base-system 指定 Linux Mint / Raspberry Pi OS 底层系统的软件源地址(域名或IP) 地址
- --branch 指定软件源仓库(路径) 仓库名
- --branch-epel 指定 EPEL 附加软件包仓库的软件源仓库(路径) 仓库名
- --branch-security 指定 Debian 系统 security 仓库的软件源仓库(路径) 仓库名
- --branch-vault 指定 CentOS / AlmaLinux 系统 vault 仓库的软件源仓库(路径) 仓库名
- --branch-portage 指定 Gentoo 系统 portage 仓库的软件源仓库(路径) 仓库名
- --branch-base-system 指定 Linux Mint / Raspberry Pi OS 底层系统的软件源仓库(路径) 仓库名
- --codename 指定 Debian 系 / openKylin 操作系统的版本代号 代号名称
- --protocol 指定 WEB 协议 http 或 https
- --use-intranet-source 是否优先使用内网软件源地址 true 或 false
- --use-official-source 是否使用目标操作系统的官方软件源 true 或 false
- --install-epel 是否安装 EPEL 附加软件包 true 或 false
- --backup 是否备份原有软件源 true 或 false
- --upgrade-software 是否更新软件包 true 或 false
- --clean-cache 是否在更新软件包后清理下载缓存 true 或 false
- --clean-screen 是否在运行前清除屏幕上的所有内容 true 或 false
- --only-epel 仅更换 EPEL 软件源模式 无
- --ignore-backup-tips 忽略覆盖备份提示 无
- --print-diff 打印源文件修改前后差异 无
- --pure-mode 纯净模式,精简打印内容 无
-
-问题报告 https://github.com/SuperManito/LinuxMirrors/issues
-```
-
-下面是一些高级用法的举例
-
-- ### 指定软件源地址
-
- ``` { .bash .no-copy }
- bash <(curl -sSL https://linuxmirrors.cn/main.sh) --source mirror.example.com
- ```
-
-- ### 指定软件源仓库
-
- 这里的软件源仓库与系统内容软件源仓库不同,指的是软件源地址后面的路径即镜像站分支仓库,虽然名义上都是仓库但是非常容易混淆
-
- 主要使用场景:目标镜像站有对应的系统镜像仓库但是不符合本项目脚本关于软件源仓库设置的默认规则
-
- ??? note "项目对于各操作系统所使用的默认仓库名称(点击展开查看)"
-
- 项目脚本为了适配大的环境不会针对某一镜像站独特的仓库名称而单独适配
-
- | 系统名称 | 涉及的名称 |
- | --- | :---: |
- | Debian | `debian` `debian-archive` |
- |
Ubuntu | `ubuntu` `ubuntu-ports` |
- |
Kali Linux | `kali` |
- |
Linux Mint | `linuxmint` `ubuntu` `ubuntu-ports` `debian` |
- |
Deepin(深度) | `deepin` |
- |
Zorin OS | `ubuntu` `ubuntu-ports` |
- |
Armbian | `armbian` |
- | Proxmox VE | `proxmox` |
- |
Raspberry Pi OS | `raspberrypi` `raspbian` `debian` `debian-archive` |
- | Red Hat Enterprise Linux :material-information-outline:{ title="9版本使用
CentOS Stream, 7、8版本使用CentOS" } | `centos` `centos-stream` `centos-altarch` `centos-vault` |
- | Fedora | `fedora` `fedora-archive` |
- |
CentOS | `centos` `centos-stream` `centos-altarch` `centos-vault` |
- |
Rocky Linux | `rocky` |
- |
AlmaLinux | `almalinux` `almalinux-vault` |
- |
openEuler(开源欧拉) | `openeuler` |
- |
OpenCloudOS(鸥栖) | `opencloudos` |
- | openKylin(开放麒麟) | `openkylin` |
- |
Anolis OS(龙蜥) | `anolis` |
- | openSUSE | `opensuse` |
- |
Arch Linux | `archlinux` `archlinuxarm` |
- |
Alpine Linux | `alpine` |
- | Gentoo | `gentoo` `gentoo-portage` |
- |
NixOS | `nix-channels` |
-
- 请看下面的例子
-
- ``` { .bash title="使用阿里云镜像站的 Rocky Linux 软件源" }
- bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
- --source mirrors.aliyun.com \
- --branch rockylinux
- ```
-
- 阿里云镜像站的 Rocky Linux 仓库名称为 [`rockylinux`](https://mirrors.aliyun.com/rockylinux),不符合默认规则,但是可以通过命令选项绕过脚本默认规则来实现。
-
- > 部分系统会同时配置多个仓库的软件源,具体详见命令选项
-
- > 由于软件源仓库作用在软件源地址上因此也可以使用多级路径,例如 `--branch "linux/debian"` -> `https://mirrors.example.com/linux/debian`,
-
-- ### 单独更换 EPEL 源
-
- !!! info "EPEL (Extra Packages for Enterprise Linux) 是由 Fedora 组织维护的一个附加软件包仓库,它主要适用于除 Fedora 操作系统以外的红帽系 Linux 发行版,配置 EPEL 仓库已成为广大用户的普遍需求,建议默认安装它"
-
- 有些时候你会发现想使用的镜像站没有 EPEL 仓库,那么你可以在第一次运行脚本时不安装或更换 EPEL 源然后再单独执行下面的命令
-
- ``` bash
- bash <(curl -sSL https://linuxmirrors.cn/main.sh) --only-epel
- ```
-
-- ### 恢复使用官方源
-
- 当你不小心删除了官方源的备份时可以使用此命令来恢复,使用此命令选项后将跳过选择软件源步骤
-
- ``` bash
- bash <(curl -sSL https://linuxmirrors.cn/main.sh) --use-official-source true
- ```
- > 部分系统不存在官方源例如 `Arch Linux`,届时会自动更换成兼容性较高的阿里云镜像站
-
-- ### 自定义 Debian Security 源
-
- 如果你想尽可能提高服务器的安全性则建议使用官方源,因为镜像同步存在延迟
-
- ``` bash
- bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
- --source-security security.debian.org \
- --branch-security debian-security
- ```
-
-- ### 指定 Debian 系 Linux 操作系统的版本代号
-
- 大多数情况下自定义版本代号用于更换系统版本,请看下面的例子
-
- === "升级 Debian 至最新 12 版本 Bookworm"
-
- ``` bash
- bash <(curl -sSL https://linuxmirrors.cn/main.sh) --codename bookworm
- ```
-
- === "将 Debian 版本切换到测试分支"
-
- ``` bash
- bash <(curl -sSL https://linuxmirrors.cn/main.sh) --codename testing
- ```
-
- 更换软件源后还需要执行系统更新命令 `apt-get dist-upgrade`,并且建议在更新完成并重启系统后重新执行本换源脚本,因为仅更换软件源配置中的系统版本代号可能会在后期使用时产生一些兼容性问题
-
- ``` { .bash title="若脚本无法实现指定版本代号,你也可以在执行脚本后手动替换" }
- sed -i "s/$(lsb_release -cs)/指定版本代号/g" /etc/apt/sources.list
- ```
-
-- ### 更换 Ubuntu EOF版本软件源
-
- !!! info "EOF 为生命周期结束的缩写(End Of Life),Ubuntu 迭代速度较快一般非长期支持(LTS)版本的生命周期只有9个月。官方会定期从主仓库移除不在生命周期内的版本仓库目录,届时可能就需要使用镜像站的 `Ubuntu Old Releases` 仓库"
-
- 具体版本支持情况详见官方 [Wiki](https://wiki.ubuntu.com/Releases),关于 `Ubuntu Old Releases` 仓库的支持情况详见各镜像站
-
- ``` bash
- bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
- --source mirrors.ustc.edu.cn \
- --branch ubuntu-old-releases
- ```
-
-- ### 无人值守(自动化)
-
- 不通过交互完成换源操作,至少需要使用如下命令选项来实现,建议熟悉后再使用
-
- ``` { .bash .no-copy title="参考命令" }
- bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
- --source mirror.example.com \
- --protocol http \
- --use-intranet-source false \
- --install-epel true \
- --backup true \
- --upgrade-software false \
- --clean-cache false \
- --ignore-backup-tips
- ```
-
-- ### 纯净模式
-
- 为了便于开发者使用故推出此功能,启用后会精简脚本内容输出,建议搭配其它命令选项无交互使用
-
- ``` bash
- bash <(curl -sSL https://linuxmirrors.cn/main.sh) --pure-mode
- ```
-
- !!! tip "滚动输出的命令日志可能存在无法预料的显示问题,不过目前暂未发现异常"
-
----
-
-## 定制脚本
-
-如果你是其它项目的开发者希望通过本项目来制作专属脚本那么请参考下面提到的内容,目前已经有国内教育单位镜像站的维护者这样做了。
-
-1. 首先不建议修改代码的底层逻辑,应尽量与本项目源码保持同步,脚本内容执行顺序由 `main` 函数控制,代码逻辑清晰
-2. 你可以简单去除一些无关内容,例如将软件源列表(数组)`mirror_list_(default|edu|abroad|extranet|intranet)` 中的内容删除,例:`mirror_list_default=()`
-3. 如果你想定制脚本打印内容可直接修改 `run_start` `run_end` `print_title` 这三个函数中的内容
-4. 如果你想添加自定义 Shell 内容详见 `main` 函数中脚本执行顺序,可以在对应位置直接插入内容也可以封装函数后调用
-5. 如果你想要缩减脚本体积那么可以删除一些不必要的内容,除了上面提到的软件源列表还有一些涉及脚本工作的部分模块内容,具体如下:
- 1. 首先在删除内容时应尽可能保留脚本原始结构,直接把涉及函数中的内容删除即可,使其保留为空函数
- 2. 可以删除一些不使用(操作系统)的软件源原始内容 `gen_repo_files_xxx`,这些内容占据了脚本 `60%` 以上的体积
- 3. 如果你不使用某些功能那么可以删除对应功能模块函数中的内容,`命令选项 handle_command_options`、`备份原有软件源 backup_original_mirrors`、`更新软件包 upgrade_software`
-6. 脚本主要功能配置是由统一的变量控制的,命令选项亦是如此,这些全局变量由全大写字母构成并遵循下划线命名法,具体变量详见如下表格,你只需要将这些变量声明在脚本头部(预留注释区域)即可快速完成定制
-
-| 变量名 | 含义 | 值类型 |
-| :-: | :-: | :-: |
-| `SOURCE` | 指定软件源地址(域名或IP) | `地址` |
-| `SOURCE_EPEL` | 指定 EPEL 附加软件包仓库的软件源地址(域名或IP) | `地址` |
-| `SOURCE_SECURITY` | 指定 Debian 系统 security 仓库的软件源地址(域名或IP) | `地址` |
-| `SOURCE_VAULT` | 指定 CentOS / AlmaLinux 系统 vault 仓库的软件源地址(域名或IP) | `地址` |
-| `SOURCE_PORTAGE` | 指定 Gentoo 系统 portage 仓库的软件源地址(域名或IP) | `地址` |
-| `SOURCE_BASE_SYSTEM` | 指定 Linux Mint / Raspberry Pi OS 底层系统的软件源地址(域名或IP) | `地址` |
-| `SOURCE_BRANCH` | 指定软件源仓库(路径) | `仓库名` |
-| `SOURCE_EPEL_BRANCH` | 指定 EPEL 附加软件包仓库的软件源仓库(路径) | `仓库名` |
-| `SOURCE_SECURITY_BRANCH` | 指定 Debian 系统 security 仓库的软件源仓库(路径) | `仓库名` |
-| `SOURCE_VAULT_BRANCH` | 指定 CentOS / AlmaLinux 系统 vault 仓库的软件源仓库(路径) | `仓库名` |
-| `SOURCE_PORTAGE_BRANCH` | 指定 Gentoo 系统 portage 仓库的软件源仓库(路径) | `仓库名` |
-| `SOURCE_BASE_SYSTEM_BRANCH` | 指定 Linux Mint / Raspberry Pi OS 底层系统的软件源仓库(路径) | `仓库名` |
-| `DEBIAN_CODENAME` | 指定 Debian 系 / openKylin 操作系统的版本代号 | `代号名称` |
-| `USE_OFFICIAL_SOURCE` | 是否使用目标操作系统的官方软件源 | `true` 或 `false` |
-| `USE_INTRANET_SOURCE` | 是否优先使用内网软件源地址 | `true` 或 `false` |
-| `WEB_PROTOCOL` | 指定 WEB 协议 | `http` 或 `https` |
-| `INSTALL_EPEL` | 是否安装 EPEL 附加软件包 | `true` 或 `false` |
-| `ONLY_EPEL` | 仅更换 EPEL 软件源模式 | `true` 或 `false` |
-| `BACKUP` | 是否备份原有软件源 | `true` 或 `false` |
-| `IGNORE_BACKUP_TIPS` | 忽略覆盖备份提示(即不覆盖备份) | `true` 或 `false` |
-| `UPGRADE_SOFTWARE` | 是否更新软件包 | `true` 或 `false` |
-| `CLEAN_CACHE` | 是否在更新软件包后清理下载缓存 | `true` 或 `false` |
-| `CLEAN_SCREEN` | 是否在运行前清除屏幕上的所有内容 | `true` 或 `false` |
-| `PRINT_DIFF` | 是否打印源文件修改前后差异 | `true` 或 `false` |
-| `PURE_MODE` | 纯净模式,精简打印内容 | `true` 或 `false` |
-
-> 部分变量存在默认值,未涉及的变量无需声明为空值(空字符串),另外如果对应功能配置不存在那么就可能会出现交互
+---
+hide:
+ - navigation
+ - footer
+---
+
+> 如果觉得这个项目不错对您有所帮助的话,请点击仓库右上角的 Star 并分享给更多的朋友 :octicons-heart-fill-24:{ .heart style="color: red" }
+
+## 一键执行命令
+
+=== ":material-home-city: 中国大陆"
+
+ !!! quote ""
+
+ === ":linuxmirrors: 官网(推荐)"
+
+ ``` bash
+ bash <(curl -sSL https://linuxmirrors.cn/main.sh)
+ ```
+
+ === ":simple-github: GitHub"
+
+ ``` bash
+ bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh)
+ ```
+
+ === ":simple-gitee: Gitee 码云"
+
+ ``` bash
+ bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)
+ ```
+
+ === ":simple-jsdelivr: jsDelivr(CDN)"
+
+ ``` bash
+ bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/ChangeMirrors.sh)
+ ```
+
+=== ":material-earth: 境外以及海外地区"
+
+ !!! quote ""
+
+ === ":linuxmirrors: 官网(推荐)"
+
+ ``` bash
+ bash <(curl -sSL https://linuxmirrors.cn/main.sh) --abroad # (1)!
+ ```
+
+ 1. 通过 `--abroad` 命令选项来使用海外软件源
+
+ === ":simple-github: GitHub"
+
+ ``` bash
+ bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh) --abroad # (1)!
+ ```
+
+ 2. 通过 `--abroad` 命令选项来使用海外软件源
+
+ === ":simple-gitee: Gitee 码云"
+
+ ``` bash
+ bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --abroad # (1)!
+ ```
+
+ 3. 通过 `--abroad` 命令选项来使用海外软件源
+
+ === ":simple-jsdelivr: jsDelivr(CDN)"
+
+ ``` bash
+ bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/ChangeMirrors.sh) --abroad # (1)!
+ ```
+
+ 4. 通过 `--abroad` 命令选项来使用海外软件源
+
+=== ":material-library: 中国大陆教育网"
+
+ !!! quote ""
+
+ === ":linuxmirrors: 官网(推荐)"
+
+ ``` bash
+ bash <(curl -sSL https://linuxmirrors.cn/main.sh) --edu # (1)!
+ ```
+
+ 1. 通过 `--edu` 命令选项来使用中国大陆教育单位软件源
+
+ === ":simple-github: GitHub"
+
+ ``` bash
+ bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh) --edu # (1)!
+ ```
+
+ 2. 通过 `--edu` 命令选项来使用中国大陆教育单位软件源
+
+ === ":simple-gitee: Gitee 码云"
+
+ ``` bash
+ bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --edu # (1)!
+ ```
+
+ 3. 通过 `--edu` 命令选项来使用中国大陆教育单位软件源
+
+ === ":simple-jsdelivr: jsDelivr(CDN)"
+
+ ``` bash
+ bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/ChangeMirrors.sh) --edu # (1)!
+ ```
+
+ 4. 通过 `--edu` 命令选项来使用中国大陆教育单位软件源
+
+选项卡分别代表脚本内置软件源类型和获取脚本途径,请在使用前检查目标镜像站是否支持您所使用的操作系统,可以在[软件源列表](../mirrors/index.md)中查看具体有哪些软件源。
+
+!!! tip "默认自动备份原有软件源内容,如需了解更多请翻阅下方文档。若使用过程中的某些选项令你疑惑不解,那么在选择软件源后一路回车即是最佳实践。"
+
+
+
+
CentOS Stream, 7、8版本使用CentOS" } | `centos` `centos-stream` `centos-altarch` `centos-vault` |
+ |