Installing Microsoft Visual Studio Code on Linux

Brief: Microsoft’s open source code editor Visual Studio Code is awesome. Learn how to install Visual Studio Code in Ubuntu and other Linux distributions.

Microsoft did the unexpected by releasing Visual Studio Code for all major desktop platforms that includes Linux as well. Soon after its release Microsoft Visual Code became one of the best open source code editors. The feature it provides are useful not only to web developers but for other languages too.

I am not going to list the features of Visual Studio Code here. I presume you already know them. So, here, I am going to show you how to install Visual Studio Code on Ubuntu and other Linux distributions.

Installing Visual Studio Code in Ubuntu and other Linux distributions

Visual Studio Code on Linux

Let’s see how to install Visual Studio Code!

Method 1: Install Visual Studio Code in Linux using Snap

Visual Studio Code is available as a Snap package. Ubuntu users can find it in the Software Center itself and install it in a couple of clicks.

Visual Studio Code in Ubuntu Software Center
Visual Studio Code in Ubuntu Software Center

Snap packaging means you can install it in any Linux distribution that supports Snap packages. Make sure to enable Snap support on your Linux distribution if you haven’t done already.

If you don’t have snap packages listed on your software center or app center, you can install VS Code using this command:

sudo snap install code --classic

Snaps are special kind of packages that are usually big in size. So it will take some time in downloading and installing the Snap package depending upon your internet speed.

Method 2: Using the .deb/.rpm packages

Microsoft provides packages to install Visual Studio Code in Linux. Just head over to the download page of Visual Studio Code and you’ll find the .deb and .rpm files options for Linux platform.

I don’t need to tell you that if you are running Ubuntu or any other Linux distribution based on Ubuntu such as Linux Mint, elementary OS etc, you need to opt for .deb file. .rpm is for Fedora and SUSE based Linux distributions.

Visual Studio Download

There are options for 32-bit systems as well. If you’re not sure about that, you can read our guide to find if your Ubuntu is 32 bit or 64 bit and then download the files accordingly.

Once downloaded, you can simply double click to install from the deb file.

Method 3: Using Flatpak

Visual Studio Code Flatpak
Visual Studio Code Flatpak

If you hate using snap packages, the best solution is to get the .deb/.rpm package. But, in case you want to utilize Flatpak, you can do that as well.

In my case, Pop OS 20.04 has Flatpak support enabled out-of-the-box. But, in case you’re not aware of Flatpak, I’d suggest you to refer to our guide to use Flatpak on Linux.

Of course, if you have Flatpak support on your software store, you can simply look for the Visual Studio Code and get it installed.

But, if you don’t have the support, you need to add Flatpak support and then type in the following command:

flatpak install flathub com.visualstudio.code
Install VS Code using umake in Ubuntu (not recommended)

You can use umake command below to install Visual Studio Code:

umake web visual-studio-code

You’ll be asked to provide a path where it will be installed:

installing Microsoft Visual Studio Code in Ubuntu

After throwing a whole lot of terms and conditions, it will ask for your permission to install Visual Studio Code. Press ‘a’ at this screen:

Installing Visual Studio Code Ubutnu

Once you do that it will start downloading and installing it. Once it is installed, you can see that Visual Studio Code icon has already been locked to the Unity Launcher. Just click on it to run it. This is how Visual Studio Code looks like in Ubuntu 15.04 Unity:

Visual Studio Code running in Ubuntu

As a last resort, you can always build it from the source code. You can find the source code of VS Code on its GitHub page.

It’s pretty easy to install Visual Studio Code in Ubuntu with the help of snap, flatpak, or deb/rpm packages available.

Now, that you know — what method do you prefer to install Microsoft’s Visual Studio Code on Linux?

Feel free to let me know your thoughts in the comments below!

Similar Posts

  • hey bro,i’m using MX linux 32 bit. And i didn’t see 32 bit version of VS code. Can you help me? or maybe suggest me some text editor like vscode that support 32 bit linux version.Nice article btw

  • Visual Studio accepts plugins that enhance functionality at almost all levels, including adding support for source control systems (such as Subversion and Git) and adding new toolsets such as visual editors and designers. Visual Studio at crackplease supports 36 different programming languages ​​and allows the code editor and debugger to support (to varying degrees) almost any programming language, as long as a language-specific service exists.