Install Visual Studio Code on Ubuntu 22.04: Best VS Code Setup

This tutorial intends to teach you to Install Visual Studio 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).

Now follow the guide steps below on the Orcacore website to complete the VS Code setup 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.

Step 1. 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

Step 2. Launch VS Code on Ubuntu 22.04

VS Code can be launched from the command line by typing “code”.

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.

Step 3. 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

Conclusion

Visual Studio Code (VS Code) is a powerful and flexible code editor that helps developers write, edit, and debug code efficiently. At this point, you have learned to Install Visual Studio Code on Ubuntu 22.04.

Hope you enjoy it. You may also like these articles:

Test Network Throughput with Iperf Tool on Linux

Find MySQL Configuration File Location on Linux

FAQs

Can I install VS Code using Snap?

Yes, VS Code is available as a Snap package. You must install Snap and then use the command below to get the VS code:
sudo snap install code --classic

How to uninstall VS Code on Ubuntu?

You can remove Visual Studio with the following command:
sudo apt remove code
Also, it is better to remove its repository with the command below:
sudo rm /etc/apt/sources.list.d/vscode.list
Then, run the autoclean command on your system:
sudo apt autoclean

Share your love

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!