Advertisement
Justman10000

Manage Visual Studio Code Server

Oct 10th, 2023 (edited)
3,055
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.06 KB | None | 0 0
  1. // To install
  2. # The version of the Microsoft Visual Studio Code Server
  3. version=$(curl -sL https://api.github.com/repos/coder/code-server/releases | grep -oP '[0-9]+\.[0-9]+\.[0-9]+' | head -n 1)
  4.  
  5. wget https://github.com/coder/code-server/releases/download/v$version/code-server-$version-linux-amd64.tar.gz
  6. gunzip code-server-$version-linux-amd64.tar.gz
  7. tar xvf code-server-$version-linux-amd64.tar
  8. rm -r code-server-$version-linux-amd64.tar
  9. mv code-server-$version-linux-amd64 /usr/local/vscode
  10.  
  11. # Now start the server! Arguments can be passed for advanced control of the server!
  12. ## Run this for all arguments:
  13. /usr/local/vscode/bin/code-server -h
  14. ## Use PASSWORD as env to set a password outside those in the config
  15. /usr/local/vscode/bin/code-server --bind-addr 0.0.0.0:8932 --locale de --user-data-dir /usr/local/vscode/user --extensions-dir /usr/local/vscode/exts &
  16. echo $! > /usr/local/vscode/pid
  17.  
  18. # Now visit http://127.0.0.1:8932. Your password is in ~/.config/code-server/config.yaml
  19.  
  20.  
  21. // To uninstall
  22. kill $(cat /usr/local/vscode/pid)
  23. rm -r /usr/local/vscode
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement