How to install VSCode on Ubuntu 22.04
VSCode is the world's most popular code editor. It quickly gained popularity and became the favourite editor of many developers. VSCode is available for almost all desktop platforms and even an online version is available.
Simple install using direct download link
VSCode .deb is available for download from https://go.microsoft.com/fwlink/?LinkID=760868. Download and install the package. Installer will also add VScode repo to Ubuntu so that you will get updates to VSCode as part of system updates. This is the recommended methods as the Snap and Flatpak version is having various bugs and may not play with extensions.
Install using Snap
VScode is also available as a snap package at Snap Store. Click install there or install using the below command.
sudo snap install --classic code
Install using Flatpak
Community maintained Flatpak of VSCode is available at Flathub. Install it using the below command.
flatpak install flathub com.visualstudio.code
VSCode will get updated as part of system updates if it's installed using deb. Otherwise it will be updated automatically by Snap/Flatpack in the background.