VPS常用命令及脚本
自动同步校正系统时间
1 | apt install systemd-timesyncd |
设置时区为北京时间
1 | timedatectl set-timezone Asia/Shanghai |
BBR调参脚本
1 | wget http://sh.xdmb.xyz/tcp.sh && bash tcp.sh |
一个精简的 Linux TCP/IP & BBR 参数智能优化脚本
1 | bash <(curl -sL https://raw.githubusercontent.com/yahuisme/network-optimization/main/script.sh) |
详情访问: https://github.com/yahuisme/network-optimization
科技lion脚本工具箱
1 | bash <(curl -sL kejilion.sh) |
双栈服务器 如果V6有问题 可以使用V4访问
1 | bash <(curl -sL --ipv4 kejilion.sh) |
一键DD/重装脚本 (One-click reinstall OS on VPS)
详情访问:https://github.com/bin456789/reinstall
国外服务器:
1 | curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh || wget -O ${_##*/} $_ |
国内服务器:
1 | curl -O https://cnb.cool/bin456789/reinstall/-/git/raw/main/reinstall.sh || wget -O ${_##*/} $_ |
检测VPS回程国内三网路由
详情访问:https://github.com/zhucaidan/mtr_trace
1 | curl curl https://raw.githubusercontent.com/zhucaidan/mtr_trace/main/mtr_trace.sh|bash |
三网回程路由测试
详情访问:https://github.com/zhanghanyun/backtrace
1 | wget -N --no-check-certificate -O routeGo.sh https://raw.githubusercontent.com/zhanghanyun/backtrace/main/install.sh && chmod +x routeGo.sh && ./routeGo.sh |
IP质量体检脚本
详情访问:https://github.com/xykt/IPQuality
1 | bash <(curl -Ls https://Check.Place) -I |
docker版
1 | docker run --rm --net=host -it xykt/check -I && docker rmi xykt/check > /dev/null 2>&1 |
网络质量体检脚本
详情访问:https://github.com/xykt/NetQuality
1 | bash <(curl -Ls https://Check.Place) -N |
docker版
1 | docker run --rm --net=host -it xykt/check -N && docker rmi xykt/check > /dev/null 2>&1 |
硬件质量体检脚本
详情访问:https://github.com/xykt/HardwareQuality
1 | bash <(curl -Ls https://Check.Place) -H |
docker版
1 | docker run --rm -it --privileged --net=host --pid=host -v /:/host:ro xykt/check -H && docker rmi xykt/check > /dev/null 2>&1 |
融合怪测评项目
详情访问:https://github.com/oneclickvirt/ecs
1 | export noninteractive=true && curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh && bash goecs.sh env && bash goecs.sh install && goecs |
docker版
1 | docker run --rm spiritlhl/goecs:latest -menu=false -l zh |
临时禁用IPv6
1 | sysctl -w net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 |
升级内核
1 | sudo apt install linux-image-amd64 |
其它命令
1 | wget -qO- bench.sh bash |
1 | bash <(curl -sL https://run.NodeQuality.com) |
猫脚本 · Catbash
详情访问:https://catbash.net/
一款 Linux VPS 综合检测脚本集合,包含三个子项目:
SICK - 硬件盘点
一次性的服务器硬件信息检测,包含CPU、内存、SMART、NVMe、RAID、网卡、GPU 等信息,彩色表格/JSON 输出。
1 | curl -sL https://catbash.net/sick | bash |
NETS - 网络测速
公网 iperf3 上下行测速,支持筛选地区:北美、欧洲(英/荷/德/法等)、亚太(日/新/港/澳等)。
需要 iperf3 + python3。
1 | curl -sL https://catbash.net/nets | bash |
CPUX - CPU 跑分
Geekbench 5 / 6 / 7 串行 CPU 测试,终端直接输出单核与多核分数。
1 | curl -sL https://catbash.net/cpux | bash |
其它链接
https://lot.pm/vps-script-toolbox.html
勇哥脚本
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 畅想生活!
