install visual studio code ubuntu

How to Install Visual Studio Code in Ubuntu

Visual Studio Code is a powerful development platform by Microsoft, used by millions of developers worldwide. It provides tons of features such as debugging support, git integration, syntax highlighting, code completion and more. It also provides a single platform to develop applications and scripts in a wide range of languages. It is generally installed and used in Windows environment but did you know that you can also use it in Ubuntu? In this article, we will learn how to install Visual Studio Code in Ubuntu. There are several ways to install visual studio code in Ubuntu. You can install it as a snap package or as a deb package. We will look at both these methods below.

How to Install Visual Studio Code in Ubuntu

Here are the steps to install visual studio code in Ubuntu.

Install Visual Studio Code as Snap Package

Snap packages are self-contained software packages that not only contain the actual software but also the binaries of its dependencies. They are easy to install and upgrade but they occupy more disk space and they may have longer application startup time.

You can install snap packages via command line, or using Ubuntu Software application. To install it via command line, open terminal and run the following command.

$ sudo snap install --classic code

That’s it. Please note, whenever there is a newer version of Visual Studio code available, it will be automatically updated.

Once you have installed visual studio code on your system, you can easily start it with the following command.

$ code

Install Visual Studio via Apt

Visual Studio code is also available from Microsoft’s official Apt repositories. So you can also install Visual Studio via apt package manager.

Open terminal and run the following command to update package index and install dependencies.

$ sudo apt update
$ sudo apt install software-properties-common apt-transport-https wget

We will need to add the GPG key for Microsoft, before we add its repository. Import Microsoft GPG key using the following command.

$ wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -

Enable Visual Studio Code Repository with the following command.

$ sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"

The above command will add apt repository for Visual Studio code. After that, you can install the visual studio code package using the following command.

$ sudo apt install code

Whenever there is a new version of Visual Studio code available, you can update your software with the following commands.

$ sudo apt update
$ sudo apt upgrade

Once you have installed visual studio code on your system, you can easily start it with the following command.

$ code

In this article, we have learnt how to install visual studio code in Ubuntu. You can use these steps in other Debian Linux systems also. Visual Studio is a great way to develop programs and applications that are cross-platform and scalable. Earlier it was available only for Windows platforms but now they are easily available for Linux platforms also. Visual Studio Code is completely free for private as well as commercial use, so you don’t need to buy its license.

Also read:

How to Evaluate Expression in Shell Script
What Does $() and ${} mean in Shell Script
How to Run C Program in Linux
How to Delete Write Protected File in Linux
How to Suspend Process in Linux

Leave a Reply

Your email address will not be published.