How to Install Visual Studio Code on Ubuntu 26.04 LTS (Resolute Raccoon)
You just installed Ubuntu 26.04 LTS. The desktop is clean. GNOME 50 looks gorgeous. But there’s one thing missing—your code editor. And let’s be honest, while GNOME Text Editor (formerly gedit) works for quick notes, you’re going to want something with real IntelliSense, debugging, Git integration, and that massive extension marketplace.
That’s Visual Studio Code.
VS Code on Linux has come a long way. In 2026, with Ubuntu 26.04’s Wayland-only GNOME 50 session, there’s one critical tweak you need to make for a crisp, lag-free experience. This guide covers the install, that Wayland fix, and the extensions you’ll actually want on day one.
Option 1: Microsoft APT Repository (Recommended)
The proper way to install VS Code on Ubuntu is through Microsoft’s official APT repository. This gives you automatic updates through apt upgrade and the most stable package.
Step 1: Install dependencies
sudo apt update
sudo apt install -y wget gpgStep 2: Import Microsoft’s GPG key
sudo install -d -m 0755 /etc/apt/keyrings
wget -qO- https://packages.microsoft.com/keys/microsoft.asc
| sudo gpg --dearmor -o /etc/apt/keyrings/packages.microsoft.gpg
sudo chmod 644 /etc/apt/keyrings/packages.microsoft.gpgStep 3: Add the VS Code repository
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main"
| sudo tee /etc/apt/sources.list.d/vscode.listStep 4: Install
sudo apt update
sudo apt install -y codeVerify it works:
code --versionExpected output: 1.xx.x followed by a commit hash and architecture.
Option 2: Snap (One Command)
If you prefer containerized packages, VS Code is available as a Snap. It’s the fastest install:
sudo snap install --classic codeThe --classic flag is required because VS Code needs full system access for its terminal and debugger.
Downside: Snap updates are automatic and unavoidable. If you dislike Snap’s update model, use the APT method above.
Option 3: Manual .deb Download
For one-off installs or air-gapped machines, download the .deb directly:
wget -O code-latest.deb "https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64"
sudo dpkg -i code-latest.deb
sudo apt install -f # fix any missing dependenciesCritical: Wayland Fix for GNOME 50
Here’s the part almost every guide misses.
Ubuntu 26.04 ships GNOME 50 as Wayland-only. Electron apps (including VS Code) default to running through XWayland. On a 4K or HiDPI display, this produces fuzzy text and a slightly laggy window drag.
The fix is a single config file that tells VS Code to use Wayland natively:
mkdir -p ~/.config
cat > ~/.config/code-flags.conf <<'EOF'
--ozone-platform-hint=auto
--enable-features=UseOzonePlatform,WaylandWindowDecorations
EOFWhat this does:
--ozone-platform-hint=autolets Electron detect and use Wayland when availableWaylandWindowDecorationsenables native GNOME client-side decorations
Restart VS Code. Open Ctrl+Shift+P → “Developer: Open Process Explorer”. The main process should now show --ozone-platform-hint=auto. The difference in text sharpness is immediately visible.
This flag file also works for VS Code Insiders (code-insiders-flags.conf) and the OSS build (code-oss).
Must-Have Extensions
VS Code is useful out of the box, but these three make it a real development environment. Install from the terminal so you can script the same setup across machines:
code --install-extension ms-python.python
code --install-extension ms-vscode-remote.remote-ssh
code --install-extension eamodio.gitlens- Python — IntelliSense, linting, debugging, Jupyter support
- Remote – SSH — edit files on remote servers without leaving VS Code
- GitLens — inline Git blame, history explorer, code lens
Launching VS Code
From the terminal:
code .This opens the current directory in VS Code. You can also open a specific file:
code ~/project/main.pyOr from the GNOME Activities overview, search for “Visual Studio Code” and launch it graphically.
Uninstalling
If installed via APT:
sudo apt purge --autoremove -y code
sudo rm /etc/apt/sources.list.d/vscode.list
sudo rm /etc/apt/keyrings/packages.microsoft.gpgIf installed via Snap:
sudo snap remove codeFinal Thoughts
VS Code on Ubuntu 26.04 LTS works great—once you apply that Wayland flag. Without it, the experience is merely okay. With it, the editor feels native and responsive, with sharp text at any scaling level.
The APT method is the one I recommend: it keeps VS Code in sync with your system updates, gives you control over when to upgrade, and works identically across amd64 and arm64 machines. Install the extensions, apply the Wayland fix, and you’ve got a development environment that rivals what you’d get on macOS or Windows.
Now go build something.
Comments