This repository contains two scripts to easily install and uninstall Visual Studio Code on a Linux system. The scripts are written in zsh and automate the setup of Visual Studio Code on a custom path and the creation of a desktop entry for easy access.
The Install.sh script downloads, extracts, and installs Visual Studio Code in a specific directory, sets up a desktop shortcut, and creates a command for launching it from the terminal.
- Downloads the stable version of Visual Studio Code for Linux (x64) as a
.tar.gzfile from the official Visual Studio Code download page. - Extracts the downloaded archive.
- Moves the extracted VS Code folder to
/sgoinfre/students/$USER/code. - Cleans up by removing the
.tar.gzfile. - Creates a
vscode.desktopfile that acts as a shortcut for launching Visual Studio Code. - Copies the desktop shortcut to your desktop and the local applications folder.
- Adds a custom
codecommand to your.zshrcfile for launching VS Code from the terminal. - Reloads the shell configuration to apply the changes.
To install Visual Studio Code, simply run the following command:
./install.shThe uninstall.sh script removes Visual Studio Code, the desktop shortcut, and the custom terminal command created during the installation process.
- Removes the Visual Studio Code directory from
/sgoinfre/students/$USER/code. - Deletes the desktop shortcut from both the Desktop and the local applications folder.
- Removes the custom
codecommand from your.zshrc. - Reloads the shell configuration to apply the changes.
To uninstall Visual Studio Code, simply run the following command:
./uninstall.sh- You must have
zshinstalled as your shell. - Internet connection to download Visual Studio Code.
- Ensure you have write permissions to the
/sgoinfre/students/$USER/directory.
- The script installs Visual Studio Code in the
/sgoinfre/students/$USER/codedirectory. You can modify the script if you wish to change the installation path. - The script adds a
codefunction to your.zshrc, allowing you to run Visual Studio Code using thecodecommand. - The desktop shortcut will be available on both your Desktop and in your applications menu.
- LinkedIn: Samuel Hurtado MarÃn
- GitHub: samuelhm