How to Install Visual Studio Code on Pop!_OS 22.04 LTS

Visual Studio Code is a free and powerful source-code editor made by Microsoft for Windows, Linux, and macOS. VSCode offers many features such as support to debug applications, embedded Git control which helps you with code completion or refactoring when needed (it even has snippets!), plus much more! You can find extensions in this extensive library that will further enhance your software development experience – all at no cost whatsoever; thanks also to being able through its continuously updated extension model to make sure those updates come quickly, so there are never any downtime periods.

In the following tutorial, you will learn how to Install Visual Code Editor (VS CODE) Pop!_OS 22.04 LTS using the command line terminal to import the Microsoft official repository and gpg key and install the IDE editor, along with how to maintain and remove the software if required in the future.

Update Pop!_OS 22.04 LTS

Firstly, it is advised to update your system to ensure all existing packages are up to date to avoid any conflicts during the installation.

sudo apt update && sudo apt upgrade -y

Install VSCode – APT with Pop!_OS Repository

The first method and the recommended way is to install Visual Studio Code using the proprietary repository from the Pop!_OS team. This version usually is up-to-date, but it can be behind the Microsoft APT repository method below.

Run the following command in the terminal to install VSCode.

sudo apt install code -y

Install VSCode – APT with Microsoft Repository

The second method is to install Visual Studio Code with the Microsoft APT repository. This version will always be up-to-date and would be preferred if you prefer working with official repositories and the latest stable versions of VSCode.

Install Required Packages

The following packages must be installed to assist in installing the software.

sudo apt install software-properties-common apt-transport-https wget -y

If you are unsure, run the command; it will not harm you.

These are the most common software packages found on nearly all Linux distributions.

Import Visual Studio Code Repository

First, you will need to import the Microsoft GPG key to verify the authenticity of the installation package.

wget -O- | sudo gpg --dearmor | sudo tee /usr/share/keyrings/vscode.gpg

Secondly, import the Microsoft Visual Source Repository with the following command in your terminal.

echo deb [arch=amd64 signed-by=/usr/share/keyrings/vscode.gpg] stable main | sudo tee /etc/apt/sources.list.d/vscode.list

Install Visual Studio Code

With the source repository sorted, you must refresh your apt package manager sources list to reflect the new addition before the Visual Studio installation.

Run the following command in your terminal to reflect the newly added repository.

sudo apt update

Now install Visual Studio with the following command:

sudo apt install code -y

How to Launch Visual Studio Code

Now that you have completed the installation, you can open the software in a few ways.

Using the command line terminal, you can open the software quickly by using the following command.


The best way to use VSCode for desktop users that prefer not to use the command line terminal is to open the GUI of the application by following the path.

Activities > Show Applications > Visual Studio Code


How to Install Visual Studio Code on Pop!_OS 22.04 LTS

Once open, you can begin to use the IDE editor. For users that may want a more private version check out How to Install VSCodium on Pop!_OS 22.04 LTS, which for the most part, works excellent beside a few sacrifices like access to the Microsoft store.


How to Install Visual Studio Code on Pop!_OS 22.04 LTS

Select the theme you want. Dark is the default and is the most popular, but the tutorial white will be chosen to change the default.

Click Mark Done on the bottom left-hand side.

Congratulations, you have installed Microsoft Visual Studio Code.

How to Remove (Uninstall) Visual Studio Code

To remove the Visual Studio software from your system, run the following command in your terminal:

sudo apt remove code --purge

Note that the –purge flag removes all data created with VSCode.

Next, remove the repository using the following command.

sudo rm /etc/apt/sources.list.d/vscode.list

For good housekeeping and security, remove the GPG key as follows.

sudo rm /usr/share/keyrings/vscode.gpg

Comments and Conclusion

The guide has shown you how to install Microsoft Visual Code on Pop!_OS 22.04 LTS using the command line terminal.

If you are looking for an excellent, lightweight IDE editor that can handle a variety of programming languages, Microsoft Visual Studio Code is the best option on the market. With its vast library of extensions and themes and its intuitive user interface, VS Code will make your coding experience more enjoyable. Have you tried using VS Code for your development projects? Let us know in the comments below!

Not what you were looking for? Try searching for additional tutorials.

Leave a Comment