If you are a programmer, chances are you might already be familiar with the nuances and capabilities of Visual Studio Code.
In this guide, you will learn how to install VS Code on Ubuntu and its related distros. For those who might be wondering what Visual Studio Code is all about, here’s a small inkling into its build features.
What Is Visual Studio Code?
Microsoft Visual Studio Code, as the name suggests, is an open-source code editor powered by Microsoft. It offers plenty of debugging options to the end-users, including embedded Git control, along with syntax highlighting, code completion, code refactoring, an integrated terminal, and snippets.
Visual Studio Code, as a platform, syncs well with Windows, macOS, and even Linux.
There are three prominent ways to install Visual Studio Code on Ubuntu. The first method is to install it from the terminal, using the snap package. The second way is to use APT along with the package repository provided by Microsoft. These repositories cater to Linux users specifically.
In the third method, you simply use the desktop’s GUI to install the software on your system.
1. Installing the VS Code Snap Package
The snap package for Visual Studio Code within Linux is solely maintained and updated by Microsoft. This way, you will always be sure of getting one of the best quality software for yourself.
As a requisite, you can install snaps either from the command line or via Ubuntu Software.
To install the Visual Studio Code snap package, open the terminal and type the following command to kickstart the installation process:
sudo snap install --classic code
This is it; once the installation is complete, you can open Visual Studio Code from the terminal or the Applications menu.
2. Installing VS Code Using APT
Alternatively, you can install Visual Studio Code using Microsoft’s repository and the default package manager on Ubuntu, which is APT.
First of all, update all the packages on your system using the following commands:
sudo apt update
sudo apt upgrade -y
Power users can also issue this code in one single line:
sudo apt update && sudo apt upgrade -y
Once you have updated and upgraded the packages, it is time to install the necessary dependencies for the repository. Type the following command in your terminal:
sudo apt install software-properties-common apt-transport-https wget
Then, use wget to import Microsoft’s GPG key:
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
To enable the VS Code repository, issue the following command:
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
As soon as the repository is enabled, all you have to do is install the software package:
sudo apt install code
To update your existing VS Code version to the newest available version, run the update/upgrade commands in this manner:
sudo apt update && sudo apt upgrade -y
This will recognize the newest versions available and update your existing version set as per the latest release.
3. Installing Visual Studio Code Using the GUI
You can also install Microsoft Visual Studio Code from your desktop’s GUI. If you are not a fan of the terminal, using the GUI for installing the package is your next best option.
To install Visual Studio Code, launch the Ubuntu Software app from the Applications menu. Search for Code and select the first result. Then, click on Install.
Once the installation is complete, you can open Visual Studio Code from the terminal or directly from the Applications menu.
Using VS Code for the First Time
Post-installation, as soon as you open VS Code on your Ubuntu machine, you would be greeted with the following screen:
If everything looks in order, you can install the extensions and configure the editor as per your preferences.
Writing Code With Visual Studio Code in Ubuntu
Installing Visual Studio Code on Ubuntu is a rather simple process. Given the various ways of installing packages, you can pick and choose a process at your convenience, so that you are able to download the software and use it whenever you want.
Visual Studio Code isn’t the only code editor available to you as a Linux user. You can test other editors and find which one suits you the best.
For more such interesting article like this, app/softwares, games, Gadget Reviews, comparisons, troubleshooting guides, listicles, and tips & tricks related to Windows, Android, iOS, and macOS, follow us on Google News, Facebook, Instagram, Twitter, YouTube, and Pinterest.