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. 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
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.
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.
You can then 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 installation files
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 (for Fedora) options under Linux.
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.
There are options for 32 bit systems as well. You can read this post 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 like you do in Windows.
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:
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:
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:
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.
See, how easy it is to install Visual Studio Code in Ubuntu, all thanks to Ubuntu’s Snap packaging. I hope this tutorial helped you. In a similar post, read how to install PyCharm in Ubuntu.
Feel free to drop a comment if you have any questions or suggestions.