Installing Visual Studio Code in Ubuntu

Installing Visual Studio Code in Ubuntu

VSCode is my favorite IDE created by Microsoft. It's Open Source and the source code is available on GitHub.

There are multiple ways to install vs code on your ubuntu system.

Many articles suggest you install it via the snap package.

But the problem is. When you install it as a snap package. It's kinda running virtually or on top of something. Which also lowers the performance.

In this article, we are going to see how we can install vscode in Ubuntu

Open your Terminal and run these commands one by one.

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg

This will download the gpg file from the Microsoft Server. GPG file contains information to decrypt the encrypted information

Next, run this command

sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/

This command will install the downloaded gpg file into our system saying that the source of the software is trusted.

Next, add the source from where the vs code will be downloaded

sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'

Once done. Let's remove the gpg file

rm -f packages.microsoft.gpg

Time to install additional packages

sudo apt install apt-transport-https

Now, Update the local repo cache and install vscode

sudo apt update

Installing vscode

sudo apt install code

Once Installed you can open via Activities.

Please note that using this method you can also install vscode in Linux Mint & Elementary OS.


Related Articles