Quick and easy VS Code installation with GitHub Copilot for Ubuntu/Debian systems.
A Bash script designed to install Visual Studio Code along with extensions such as GitHub Copilot and other custom extensions on Linux distributions, including Debian and Ubuntu.
- Quick Install
- Requirements
- System Compatibility
- Manual Installation
- Update VS Code
- Installed Components
- Restricted Mode
- Troubleshooting
- Advanced Installation
- Upcoming Features
- Version History
One-line installation command:
wget -qO- https://raw.githubusercontent.com/Shaerif/bash-install-vscode/refs/heads/main/install_vscode.sh | sudo bash
- Ubuntu 16.04+ or Debian-based distribution
- Root/sudo privileges
- Internet connection
- Minimum 1GB free disk space
- Ubuntu (all versions)
- Xubuntu (fully supported)
- Linux Mint
- Debian
- Pop!_OS
- Elementary OS
- Zorin OS
- Any Debian-based distribution
This script has been specially optimized for Xubuntu with:
- Automatic snapd configuration
- Desktop environment compatibility checks
- Xfce integration support
- Clone the repository:
git clone https://github.com/Shaerif/bash-install-vscode.git
cd bash-install-vscode
chmod +x install_vscode.sh
./install_vscode.sh
sudo snap refresh code
code --install-extension @outdated --force
# Update specific components
sudo bash install_vscode.sh --yes --minimal # VS Code only
sudo bash install_vscode.sh --yes --no-build # VS Code + extensions
sudo bash install_vscode.sh --extensions "github.copilot" # Specific extension
- Visual Studio Code (latest stable via snap)
- GitHub Copilot
- GitHub Copilot Chat
- Build essentials (gcc, g++, make)
- Git (latest stable)
- Common development tools and libraries
It might be that upon opening Visual Studio Code, some of the installed extensions are disabled. This is because you are using VS code in restricted mode.
From the Visual Studio Code documentation on Workspace Trust:
Restricted Mode tries to prevent automatic code execution by disabling or limiting the operation of several VS Code features: tasks, debugging, workspace settings, and extensions.
To view the list of disabled extensions, go to Extensions on the left-hand side menu (Ctrl+Shift+X
), the search @workspaceUnsupported
.
You can circumvent this problem by selecting Trust
in the central panel:
More information:
If you encounter issues:
- Verify internet connectivity
- Check sudo privileges
- For Snap errors:
sudo apt update
sudo apt install snapd
sudo snap install core
- For extension installation failures:
code --list-extensions
code --install-extension <extension-id> --force
The script supports several command-line arguments for customized installation:
Specify a custom installation directory:
sudo bash install_vscode.sh --install-path /custom/path
Run the script without any prompts:
sudo bash install_vscode.sh --yes
Install specific extensions during setup:
sudo bash install_vscode.sh --extensions "ms-python.python ms-vscode.cpptools"
Control which components to install by combining flags:
sudo bash install_vscode.sh --no-snap --no-build --minimal
Run the script in debug mode:
bash -x install_vscode.sh
- Offline installation support
- Extension profiles (Development, Data Science, Web)
- Auto-configuration backup/restore
- Multi-user installation support
- Custom themes and settings presets
- Docker development container support
- System health checks and optimization
- 2024.2 (Current): 🛠️ Command-line Enhancement
- Added installation options (--install-path, --yes, etc.)
- Component selection support
- Custom extension installation
- Enhanced error handling and recovery
- 2024.2: 🔄 Enhanced distribution support
- Added comprehensive Xubuntu support
- Improved distribution detection
- Added support for older Ubuntu versions
- Enhanced error handling
- 2024.1: 🤖 GitHub Copilot Focus
- Streamlined GitHub Copilot integration
- Removed legacy components
- Added documentation emojis
- Distribution detection improvements
- 2023.2: Added support for all Debian-based distributions
- 2023.1: Added Xubuntu support
- 2021.1: Initial release
GNU General Public License v3.0