How to Install Visual Studio Code on Ubuntu 22.04
VS Code supports debugging, embedded Git Control, syntax highlighting, and code completion features similar to Atom editor.
Install Visual Studio Code On Ubuntu 22.04
Install VS Code from Microsoft Repository
Update the repository index and then install HTTPS support for apt.
sudo apt update sudo apt install -y curl apt-transport-https
Next, download and import the Microsoft signing GPG key.
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/ms-vscode-keyring.gpg
Now, add the Microsoft Visual Studio Code repository to your system.
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/ms-vscode-keyring.gpg] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
After adding the VS code repository, update the repository index.
sudo apt update
Finally, use the below command to install the Visual Studio Code.
sudo apt install -y code
Install Visual Studio Code from Snap Store
VS Code is now available as snap packages from the Snap store, and you can install it with the below commands.
sudo snap refresh sudo snap install code --classic
Launch Visual Studio Code
Once the VS Code is installed on your system, you can launch it by running
code in the terminal or going to Activities >> Search for Visual Studio Code.
You will get the Get started with VS code window on the first launch.
Update Visual Studio Code
Microsoft releases the update every month for VS Code. So, you can follow the below steps to keep the Visual Studio Code updated.
Update VS Code from Microsoft Repository:
sudo apt update sudo apt --only-upgrade install code
Update VS Code from Snap Store:
sudo snap refresh code