How to Install VS Code on Ubuntu 24.04 LTS

Installing VS Code on Ubuntu 24.04 LTS made easy. Follow our step-by-step guide for seamless installation and start programming in no time!

Microsoft’s Visual Studio Code (VS Code) is one of the top choices among developers regarding code editors. It’s known for its versatility, support for many programming languages, and ability to be extended with many useful tools that make the developer’s life much easier and more productive.

Here, we’ll use two approaches to walk you through installing Visual Studio Code on Ubuntu 24.04 LTS (Noble Numbat).

  1. Using the Official Microsoft Repository (Recommended): This method is preferred because it allows you to install the latest updates directly from Microsoft, ensuring better speed and reliability than other approaches.
  2. Installing as a Snap Package: This method uses Ubuntu’s software distribution system, Snap. While Ubuntu promotes it, users generally don’t favor it.

The choice of which of the two to follow is entirely up to you, depending on your preferences.

Install Visual Studio Code on Ubuntu 24.04 LTS

This guide will use the sudo command, assuming you have sudo privileges.

Step 1: Install Prerequisites

Before we begin the installation, we must install some packages that will be required to be available on our Ubuntu 24.04 system for the next steps.

To accomplish this, type the following APT commands to update the package base and install prerequisites:

sudo apt update
sudo apt install wget gpg apt-transport-httpsCode language: Bash (bash)

Step 2: Import Microsoft’s GPG Key

To ensure that the packages we receive to install the Visual Studio Code are genuine, we should download and import the Microsoft signed GPG keys on our Ubuntu 24.04 system.

wget -qO- | gpg --dearmor >
sudo install -D -o root -g root -m 644 /etc/apt/keyrings/ language: Bash (bash)
Download & import Microsoft’s GPG key.

Notice that none of the commands generate output.

Step 3: Add Microsoft’s Visual Studio Code Repository

After importing Microsoft’s GPG keys, we’ll add the official Visual Studio Code repository to our Ubuntu 24.04 system. If a new version is released, the update package will be made available with the rest of your system’s regular updates.

echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/] stable main" | sudo tee /etc/apt/sources.list.d/vscode.list > /dev/nullCode language: Bash (bash)

Then, you can safely delete the downloaded GPG key, which has already been imported into your system.

rm language: Bash (bash)
Remove locally downloaded Microsoft’s GPG key.
Remove locally downloaded Microsoft’s GPG key.

Step 4: Run System Update

Before we proceed with VS Code installation on our Ubuntu 24.04 system, we should update the list of available packages. So, run the below command to refresh Ubuntu’s software repositories index.

sudo apt updateCode language: Bash (bash)
Updating Ubuntu's repositories index.
Updating Ubuntu’s repositories index.

As you can see from the output above, the Microsoft repository is now available on your system and ready to be used.

Step 5: Install VS Code on Ubuntu 24.04 LTS

Everything is already prepared for the actual installation. To install VS Code on your Ubuntu 24.04 LTS (Noble Numbat) system, run the following command and wait for the installation to complete.

sudo apt install codeCode language: Bash (bash)
Installing VS Code on Ubuntu 24.04 LTS.
Installing VS Code on Ubuntu 24.04 LTS.

Step 6: Run Visual Studio Code on Ubuntu 24.04

You can start using VS Code by launching it from the desktop application menu. Search for “vscode,” and click to run the same when its icon appears.

Run Visual Studio Code on Ubuntu 24.04.
Run Visual Studio Code on Ubuntu 24.04.

When you start VS Code for the first time, a window like the following should appear:

VS Code runs on Ubuntu 24.04 LTS.
VS Code runs on Ubuntu 24.04 LTS.

When setting up your interface, you will be asked to choose a theme and have the ability to personalize your IDE to match your preferences.

For example, you can modify font size, color scheme, and layout settings. Furthermore, you can install extensions that expand the IDE’s capabilities and features.

Doing so will allow you to customize your development environment according to your requirements, making your coding experience more efficient and enjoyable.

Uninstall VS Code

If you uninstall Visual Studio Code from your Ubuntu system for any reason, you can do it easily by running the provided command below:

sudo apt remove codeCode language: Basic (basic)

Install Visual Studio Code as Snap

Snap is an approach to distributing software encapsulated in a package that offers compatibility with various Linux distributions. Since Canonical developed the technology, it’s not surprising that Ubuntu offers some of its software as Snap packages.

However, Snap packages have some drawbacks, one being speed compared to applications installed natively as DEB files. Anyway. If that’s your choice, installing Visual Studio Code as a Snap package on Ubuntu 24.04 involves executing a single command.

sudo snap install --classic code
Install Visual Studio Code as Snap.
Install Visual Studio Code as Snap.

That’s all. The application can then be run as outlined in the previous section.

However, if you feel uncomfortable with the command line, you can achieve the same result by installing VS Code as a Snap package through Ubuntu’s graphical applications manager.

Run the App Center and search for “code,” then select it from the results list.

Install Visual Studio Code using Ubuntu's App Center.
Install Visual Studio Code using Ubuntu’s App Center.

Next, click the “Install” button to install Visual Studio Code as a Snap package.

Install Visual Studio Code using Ubuntu's App Center.
Install Visual Studio Code using Ubuntu’s App Center.


This guide showed how to install Visual Studio Code on Ubuntu 24.04 LTS using two techniques: as a native DEB application or as a Snap package. Which option you choose is dependent entirely on your personal preferences.

Enjoy coding with one of the most flexible and powerful editors available!

If you have any questions, please leave them in the comments section below. To learn more about Visual Studio Code, visit its official documentation page.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%