According to the official website:
VS Code is a free and open-source text and source code editor for macOS, Linux, and Microsoft Windows. In this post we are going to discuss the process of installing Visual Studio Code on Ubuntu and Ubuntu based Linux distributions.
> Install using official package repository
The process of installing VS Code from the official package repository is fairly simple. Open a terminal by pressing Ctrl + Alt + T and follow the steps given below:
Run the following command to add the package repository to your system:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
Update the package cache to incorporate the new changes:
sudo apt-get update
Finally, to install Atom run:
sudo apt-get install code
> Install using .deb package
Download the package by clicking here and selecting the .deb option.
Before proceeding remember to change your working directory in terminal to the directory where the .deb package was dowloaded. Use the cd command to change directory.
Install the package using the dpkg command:
sudo dpkg -i FileName.deb
Replace FileName with the name of the file you just downloaded.
Finally, to install any missing dependencies run:
sudo apt-get -f install
Installing the .deb package will automatically add VS Code to your apt repository and can thus be updated automatically with the regular system updates.
Visual Studio Code has now been successfully installed on your system. Any further queries and suggestions are welcome in the comments section below. If your are interested in Sublime Text or Atom find the installation guide here and here respectively. A detailed post about ten best plugins to get you started with Visual Studio Code are coming soon.