How to Install Visual Studio Code on Ubuntu 22.04

Install Visual Studio Code on Ubuntu 22.04

In this article, we will have explained the necessary steps to install Visual Studio Code on Ubuntu 22.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Visual Studio Code (VS Code) is a popular source text editor from Microsoft. It has built-in support for JavaScript, TypeScript, and Node.js, as well as any programming languages such as C++, Java, Python, and much more.

Install Visual Studio Code on Ubuntu 22.04 Jammy Jellyfish

Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.

sudo apt update
sudo apt upgrade
sudo apt install software-properties-common apt-transport-https wget

Step 2. Install Visual Studio Code on Ubuntu Linux.

Installing VSCode on your Ubuntu 22.04 Linux system is straightforward, Now we Run the following command to import the specified Microsoft GPG key into the terminal:

wget –q https://packages.microsoft.com/key/microsoft.asc -O- | sudo apt-key add -

After that, we will need to enable the VSCode repository:

sudo add-apt-repository "deb [ach=amd64] https://packages.microsoft.com/repos/vscode stable main"

The final step is to run the installation command for the Visual Studio Code package:

sudo apt install code

Step 3. Launch Visual Studio Code.

After installing VSCode, you can now open this application by searching Visual Studio Code in Activities and click its icon to launch. When you open it, a window like this appear:

Install Visual Studio Code on Ubuntu 22.04

Step 4. Uninstall VSCode on Ubuntu 22.04.

Same as the installation process, the uninstall process is also easy. To uninstall Visual Studio Code on your Ubuntu system, you can run this command to uninstall the program:

sudo apt purge code
sudo apt autoremove

That’s all you need to do to install VSCode on Ubuntu 22.04 LTS Jammy Jellyfish. I hope you find this quick tip helpful. For further reading on the install Microsoft Visual Studio Code, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.