Install Visual Studio Code on Ubuntu 22.04

This tutorial intends to teach you to Install Visual Studio Code (VS Code) on Ubuntu 22.04.

Visual Studio Code is a free, lightweight but powerful source code editor that runs on your desktop and on the web and is available for Windows, macOS, Linux, and Raspberry Pi OS. It comes with built-in support for JavaScript, TypeScript, and Node.js and has a rich ecosystem of extensions for other programming languages (such as C++, C#, Java, Python, PHP, and Go), runtimes (such as .NET and Unity), environments (such as Docker and Kubernetes), and clouds (such as Amazon Web Services, Microsoft Azure, and Google Cloud Platform).

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- | 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] 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:

Visual Studio Code window on Ubuntu 22.04

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:

Test Network Throughput with Iperf Tool on Linux

Find MySQL Configuration File Location on Linux

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!