How to Install MS Visual Studio Code in Ubuntu 16.04/16.10

Microsoft visual studio code

This quick tutorial is going to show you how to install Microsoft Visual Studio Code editor in Ubuntu 16.04, Ubuntu 16.10, Linux Mint 18 by adding the official Microsoft VS code repository.

Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Python, PHP, Go) and runtimes (such as .NET and Unity).

So far the latest release is VS Code 1.10, and 64-bit DEB package is available for download at its official website.

To receive Visual Studio Code updates along with other system updates via Software Updater, you may want to add the VS Code repository via following steps:

1. Open terminal (Ctrl+Alt+T) and run command to download Microsoft GPG key:

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg

microsoft key

Then install the key via command:

sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

Type in your password (no visual feedback) when it prompts and hit Enter.

2. Add the VS Code repository to your system by running command:

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

vs-code-repo

3. Finally install the VS Code editor via either Synaptic Package Manager:

install-code-synaptic

or run the commands below in terminal:

sudo apt update

sudo apt install code

Uninstall:

To remove VS Code editor, either use Synaptic Package Manager or run the command below in terminal:

sudo apt remove code && sudo apt autoremove

To remove VS Code repository, simply go to System Settings -> Software & Updates -> Other Software tab.

About ml

ml is a part time stay-at-home dad who've been using Ubuntu Desktop for a few years. He writes in the free time and wishes to share some useful tips with Ubuntu beginners and lovers.