3 Ways To Install Visual Studio Code In Ubuntu Using Terminal

Visual Studio is a development environment for software programmers offered by Microsoft. Here we learn – how to install Visual studio code in Ubuntu using Terminal.

If you are a programmer, you don’t need any introduction to software development environments. Popular examples are Eclipse or Microsoft’s Visual Studio.

Visual Studio is a development environment that you can use to program in different programming languages. It supports Visual Basic .NET, C, or C # languages, among others. VSCode offers various functions to facilitate the development process, such as it can automatically check the syntax of the programming language, automatically add methods or functions of the respective language and also offers graphical interfaces. It is free and based on open source.

Ways to install Visual Studio code in Ubuntu Linux

The steps or methods below will work for all versions of Ubuntu such as 21.04 / 20.04 / 18.04 and other versions supported by Canonical. Including Linux Mint, Basic OS, MX Linux, POP! OS, Debian and other similar Linux versions.

Install using the VSCode repository

  • Open your Ubuntu command terminal

You can visit the app launcher to run the terminal or use the keyboard shortcut Ctrl + Alt + T.

  • Add GPG Key and Microsoft Visual Studio Code Repository

Add the GPG key which will ensure the system that the packages we get from the vscode repository are from the original source without any tampering.

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
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'
rm -f packages.microsoft.gpg

To notify the system of the new added repository by refreshing the cache, just run the update system command:

sudo apt update
  • Command to install VS code on Ubuntu Linux

Finally, run the command to install the latest Visual Studio code packages on your Ubuntu Linux system.

sudo apt install code

Installing VS Code using the Snap package

As we know from the Ubuntu system, we already have a snap ready to use, however, those who don’t can use the command:

sudo apt install snapd

Whereas for Linux Mint 20 see this tutorial – Enable Snapd on Linux Mint 20.1

To install VSCode using Snap, we don’t need to manage multiple commands or add repositories, just run-

sudo snap install --classic code

Installing Visual Code Studio on Ubuntu Linux Using the .deb File

  • Download Latest VS Code Deb File
wget -O vscode.deb 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64'
  • Install using Apt package manager
sudo apt install ./vscode

Go to the app launcher, find VSCode and click on it to run it.

About Jon Moses

Check Also

Court of Appeal says AI cannot be the inventor of a patent • The Register

The England and Wales Court of Appeal this week dismissed a man’s plea to have …

Leave a Reply

Your email address will not be published. Required fields are marked *