This tutorial intends to teach you to Install Visual Studio Code (VS Code) on Ubuntu 22.04.
Steps To Install Visual Studio Code on Ubuntu 22.04
To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with Ubuntu 22.04.
Install VS Code on Ubuntu 22.04
First, you need to update your local package index with the command below:
sudo apt update
Then, use the following command to install the dependencies:
sudo apt install software-properties-common apt-transport-https -y
Import Microsoft GPG Key
At this point, you need to use the wget command to import the Microsoft GPG Key on Ubuntu 22.04:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor | sudo tee /usr/share/keyrings/vscode.gpg
Add VS Code Repository
Here you should add the VS code repository on Ubuntu 22.04 with the following command:
echo deb [arch=amd64 signed-by=/usr/share/keyrings/vscode.gpg] https://packages.microsoft.com/repos/vscode stable main | sudo tee /etc/apt/sources.list.d/vscode.list
Install Visual Studio Code
Now you can install visual studio code on Ubuntu 22.04 by using the command below:
# sudo apt update # sudo apt install code
Launch VS Code on Ubuntu 22.04
VS Code can be launched from the command line by typing “code”.
Or you can click on the VS Code icon (“Applications -> Programming -> Visual Studio Code”).
When you start VS Code for the first time, a window like the following will be displayed:
You can now begin installing extensions and configuring VS Code according to your preferences.
Update VS Code on Ubuntu 22.04
When a new version of Visual Studio Code is released you can update the package through your desktop standard Software Update tool or by running the following commands:
# sudo apt update # sudo apt upgrade
At this point, you have learned to Install Visual Studio Code on Ubuntu 22.04.
Hope you enjoy it. You may be like these articles: