Skip to content

Instantly share code, notes, and snippets.

@nnWhisperer
Forked from cvcore/download_vscode_server.sh
Created September 6, 2025 08:34
Show Gist options
  • Select an option

  • Save nnWhisperer/706fb157307d2a15e48139dce0d742f4 to your computer and use it in GitHub Desktop.

Select an option

Save nnWhisperer/706fb157307d2a15e48139dce0d742f4 to your computer and use it in GitHub Desktop.
Manual download vscode-server
#!/bin/bash
# This script downloads and installs a specific version of VSCode Server for Linux.
# The version is specified by the first argument to the script.
# You can find the git commit id in the output of Remote - SSH plugin in VSCode.
# The output looks like this:
# ...
# Using commit id "af28b32d7e553898b2a91af498b1fb666fdebe0c" and quality "stable" for server
# ...
git_cid="$1"
echo "Installing VSCode Server version: ${git_cid}"
install_path="${HOME}/.vscode-server/bin/${git_cid}"
pushd /tmp
wget -O vscode-server.tar.gz https://update.code.visualstudio.com/commit:${git_cid}/server-linux-x64/stable
mkdir -p ${install_path}
tar -xzf vscode-server.tar.gz -C ${install_path} --strip-components 1
touch ${install_path}/0
popd
@nnWhisperer
Copy link
Author

taking a helpful quote from tommyme's fork:

to show vscode commit id, there are several methods

  1. help -> about will show a dialog shows commit.
  2. code --version to get commit

@nnWhisperer
Copy link
Author

code --version from host terminal and get the commit-id.
from the devcontainer terminal:

export the_commit_id=*
/bin/bash -c "$(curl -fsSL https://gist.github.com/nnWhisperer/706fb157307d2a15e48139dce0d742f4/raw/download_vscode_server.sh)" -- $the_commit_id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment