2026 年 VPS 常用脚本汇总

拿到一台新 VPS 后,通常要重装系统、跑性能测试、查流媒体解锁和 IP 质量、优化网络、测速和回程路由。这篇文章把这些常用脚本整理到一起,方便收藏和复制使用。

使用前须知

  1. 以下脚本请在 root 用户下执行。
  2. 脚本都是从网络下载后直接运行的,建议先了解脚本来源,在自己信任的机器上使用。
  3. DD 重装系统会清空整块硬盘的数据,操作前务必备份。
  4. 代码里的 密码 请替换成你自己的密码,并使用强密码。

一、DD 重装系统脚本

1. 史上最强 DD 重装脚本(Debian 12)

下面命令会把系统重装为 Debian 12,并设置 root 密码。把 密码 改成你自己的:

wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh && bash InstallNET.sh -debian 12 -pwd '密码'

2. 萌咖大佬的脚本(重装 Windows 10)

下面命令会把系统重装为 Windows 10,语言为中文:

bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -windows 10  -lang "cn"

重装 Windows 对内存和硬盘有一定要求,小配置机器请谨慎使用。


二、综合测试脚本

一次性测试服务器的硬件信息、磁盘 IO、网络速度等。

bench.sh

wget -qO- bench.sh | bash

LemonBench(快速模式)

wget -qO- https://raw.githubusercontent.com/LemonBench/LemonBench/main/LemonBench.sh | bash -s -- --fast

三、性能测试(YABS)

测试 CPU、内存、磁盘和 iperf3 网络性能。

curl -sL yabs.sh | bash

如果只想跑 Geekbench 5:

curl -sL yabs.sh | bash -s -- -5

四、流媒体及 IP 质量测试

1. 常用流媒体解锁检测

bash <(curl -L -s check.unlock.media)

2. 原生 IP 检测

bash <(curl -sL Media.Check.Place)

3. IP 质量体检脚本

bash <(curl -sL IP.Check.Place)

4. 准确度最高的检测脚本

bash <(curl -L -s https://github.com/1-stream/RegionRestrictionCheck/raw/main/check.sh)

五、BBR v3 优化脚本

1. 安装别名

bash <(curl -fsSL "https://raw.githubusercontent.com/Eric86777/vps-tcp-tune/main/install-alias.sh?$(date +%s)")

2. 重新加载配置

source ~/.bashrc  # 或 source ~/.zshrc

3. 以后直接使用

bbr

六、测速脚本

1. 全球测速

wget -qO- nws.sh | bash

2. Ping 和路由测试

使用时请把 [region] 换成你要测试的地区:

wget -qO- nws.sh | bash -s -- -rt [region]

七、回程路由测试

1. 直接显示回程(小白推荐)

curl https://raw.githubusercontent.com/ludashi2020/backtrace/main/install.sh -sSf | sh

2. 回程详细测试(推荐)

wget -N --no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && bash AutoTrace.sh

总结

用途推荐脚本
重装系统InstallNET.sh
综合测试bench.sh / LemonBench
性能测试YABS
流媒体 / IP 质量check.unlock.media / IP.Check.Place
网络优化BBR v3 脚本
测速nws.sh
回程路由backtrace / AutoTrace

希望这份合集对你有用,觉得好用可以收藏本文。脚本如有更新,以各作者的 GitHub 仓库为准。

Leave a Reply

您的邮箱地址不会被公开。 必填项已用 * 标注