Install Visual studio code on Ubuntu 19.04 Linux

A simple way to install Visual studio code on Ubuntu Linux by adding the official repository of Microsoft VS Code using Command Terminal… 

Visual Studio code for Linux is developed by Microsoft under free and open source license. It is a development environment that is cross-platform and also supports Windows and MacOS. Microsoft Visual studio code is a code editor for developers introduced first time at the 2015 developer conference build in San Francisco.

The biggest feature of the tool is its native availability for Windows, Linux and MacOS so that program code can be optimized without thinking about the operating system. User can download VS all supported platforms from its official website unlike similar development environments such as visual studio 2015.

Microsoft visual studio code works completely at the file and folder level. The editor is suitable for debugging and developing cloud and web applications and supports more than 30 different programming languages including c, c++, PHP, Java and HTML.

Visual Studio Code offers multiple features such as syntax highlighting, bracket matching or Intellisense provides more clarity when editing the complex code. Other features include a keyboard-friendly interface with customizable keyboard commands built-in debugging tools for node.js typescript and javascript support 5 and node.js web technologies and git support.

Over the more than 1000 extensions are present in the Visual studio marketplace, that can help to extend the functionality of the code editor with which they can work together and across platforms on various projects. It also offers an integrated update function that ensures it always up-to-date without the user having to worry about manual updates.

Here we are using Ubuntu 19.04 to install Visual Studio code but the steps will be the same for other Ubuntu versions such as 18.04, 16.04, 14.04 including Debian, Linux Mint, Elementary OS, Zorin OS and other similar distros. Official download Website page of Visual Studio Code.

Step 1: Open command Terminal

On your respective Linux distro open command terminal app available in Applications. Also, you can use keyboard shortcut CTRL+ALT+T.

Note: You should have root access to run below commands…

Step 2: Run command to update system

Before moving forward to command that we need to install Visual studio code on Ubuntu, we update system for any latest package and security updates.

sudo apt-get update

Step 3: Command to install Visual studio code dependencies

There is one extra package that we need, to ensure smooth installation without any problem.

sudo apt-get install apt-transport-https

Step 4: Import the Microsoft GPG key

To authenticate the package of Visual studio code, we are about to download and install in the next step; are from a trusted source and free from any malicious thing, we import GNU Privacy Guard (GPG) key from Microsoft. GPG is an encryption technology that use to encrypt and decrypt files in Linux.

sudo apt-get install curl
curl | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/

Step 5: Add Visual Studio code repository

To add the repository of Microsoft VS on Linux Ubuntu, run the below command, this will helps us to fetch and install the main software packages we need to install this coding editor platform.

sudo sh -c 'echo "deb [arch=amd64] stable main" > /etc/apt/sources.list.d/vscode.list'

Step 6: Update Linux Package cache and install Visual Studio code

Finally, we have set up everything we need to get VS on our Ubuntu Linux platform. Thus, first, we run the update command to purge repository cache and then will use the Visual Studio installation command.

sudo apt-get update
sudo apt-get install code

install Visual Studio code Ubuntu Install

Step 7: Run the Coder program

After the installation, you can easily find it to run from the Applications, go there and search Visual Studio and when it appears, click to run.

You can also run it via command terminal by simply typing:


Visual studio code open source Ubuntu

Run Visual Studio code On Ubuntu

For Updating VS

There is no special commanded needed for this purpose as we already have included Visual Studio code repo in our Linux OS, thus simple run system packages update and upgrade command:

sudo apt-get update && upgrade

Uninstall Visual Studio code

In case you don’t want this application any more on your Linux system, then to remove it just use the below command:

sudo apt remove code

If you want to know how to install extensions on the VS code then see this link

Other Tutorials: