国内服务器安装 Nushell:从 40KB/s 到 1MB/s
2026-05-08
最近想把一台 Ubuntu 服务器的默认 shell 换成 Nushell,结果在下载这一步卡住了。试了几种方式,结论先看:
| 方法 | 速度 | 耗时 |
|---|---|---|
| curl 直连 | ~40 KB/s | ~30 分钟 |
| aria2 多线程直连 | ~40 KB/s | ~30 分钟 |
| curl + ghproxy | ~500 KB/s | ~2 分钟 |
| aria2 + ghproxy | ~1.1 MB/s | ~1 分钟 |
直连太慢
curl 直接下 GitHub Release 的 67MB 压缩包,只有 40KB/s,预计要 20 多个小时。
aria2 多线程帮不上忙
aria2c -x 16 -s 16,速度还是 40KB/s。瓶颈在 GitHub 到国内的带宽,不在连接数,开再多线程也没用。
ghproxy 走缓存
ghproxy.net 是一个 GitHub 代理服务,它在服务器端缓存文件,别人下载过的你不必再从 GitHub 拉。在 URL 前加上 https://ghproxy.net/ 就行,配合 aria2 多线程:
aria2c -x 16 -s 16 \
https://ghproxy.net/https://github.com/nushell/nushell/releases/download/0.112.2/nu-0.112.2-x86_64-unknown-linux-gnu.tar.gz
速度飙到 1.1MB/s,不到一分钟下完。
安装
tar xzf nu.tar.gz -C /tmp
sudo cp /tmp/nu-0.112.2-x86_64-unknown-linux-gnu/nu /usr/local/bin/
sudo chsh -s /usr/local/bin/nu ubuntu # 设为默认 shell
登出再登录就进 Nushell 了。
其他代理地址
https://ghproxy.net/,稳定,支持 HTTPShttps://mirror.ghproxy.com/,备用
用法一样,拼接在原始 URL 前面。如果有系统级代理(clash、v2ray),直接在 curl 或 aria2 里配 --proxy 效果更好。