离线安装VS Code Server

1. 获取commit

https://github.com/microsoft/vscode/tags 获取最新的commit

2. 清理目录

mkdir -p ~/.vscode-server/bin/
rm -rf ~/.vscode-server/bin/*

3. 下载

commit_id="3866c3553be8b268c8a7f8c0482c0c0177aa8bfa"  #此处要修改
wget https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable -O vscode-server.tgz

4. 传送

使用任意方法传输vscode-server.tgz文件到~/.vscode-server/目录下

5. 解压

commit_id="3866c3553be8b268c8a7f8c0482c0c0177aa8bfa"  #此处要修改
cd ~/.vscode-server/
tar -zxf vscode-server.tgz
mkdir bin/${commit_id}
mv vscode-server-linux-x64/* bin/${commit_id}
rm -rf vscode-server.tgz vscode-server-linux-x64
posted @ 2021-08-27 16:20  spacelit  阅读(487)  评论(0编辑  收藏  举报