If you're a programmer, you are likely already familiar with the nuances and capabilities of Visual Studio Code.
This guide will show you how to install VS Code on Ubuntu and its distributions. For those who might be wondering what Visual Studio Code is all about, here's a little glimpse into the build features.
What is Visual Studio Code?
Microsoft Visual Studio Code, as the name suggests, is an open source code editor from Microsoft. It gives end users plenty of debugging options, including embedded Git control, along with syntax highlighting, code completion, code refactoring, a built-in terminal, and snippets.
As a platform, Visual Studio Code can be synchronized well with Windows, macOS and even Linux.
There are three known ways to install Visual Studio Code on Ubuntu. The first method is to install it from the terminal using the snap package. The second option is to use APT in conjunction with the package repository provided by Microsoft. These repositories are specifically aimed at Linux users.
The third method is to simply use the desktop's GUI to install the software on your system.
1. Install the VS Code Snap package
The snap package for Visual Studio Code within Linux is maintained and updated exclusively by Microsoft. That way, you can always be sure that you are getting some of the highest quality software for yourself.
MAKEUSEOF VIDEO OF THE DAY
As a prerequisite, you can install Snaps either from the command line or through the Ubuntu software.
To install the Visual Studio Code snap package, open Terminal and enter the following command to start the installation process:
sudo snap install – classic code
That's it; Once the installation is complete, you can open Visual Studio Code from the Terminal or the application menu.
2. Install VS Code with APT
Alternatively, you can install Visual Studio Code on Ubuntu using Microsoft's repository and the default package manager which is APT.
First, update all packages on your system using the following commands:
sudo apt update
sudo apt upgrade -y
Power users can also print this code on a single line:
sudo apt update && sudo apt upgrade -y
After you've updated and updated the packages, it's time to install the necessary dependencies for the repository. Enter the following command into your terminal:
sudo apt install software-properties-common apt-transport-https wget
Then use wget How to import Microsoft's GPG key:
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo add apt-key –
Issue the following command to enable the VS Code repository:
sudo add-apt-repository "deb (arch = amd64) https://packages.microsoft.com/repos/vscode stable main"
Once the repository is activated, all you need to do is install the software package:
sudo apt installation code
To update your existing VS Code version to the latest available version, run the update / upgrade commands as follows:
sudo apt update && sudo apt upgrade -y
This will detect the latest available versions and update your existing version set according to the latest version.
3. Install Visual Studio Code using the GUI
You can also install Microsoft Visual Studio Code from your desktop GUI. If you're not a fan of the terminal, using the GUI to install the package is the next best option.
To install Visual Studio Code, start the Ubuntu software app from the applications menu. Search for code and select the first result. Then click on To install.
Once the installation is complete, you can open Visual Studio Code from the terminal or directly from the application menu.
Using VS Code for the first time
Once installed, once you open VS Code on your Ubuntu computer, you'll be greeted with the following screen:
If everything is fine, you can install the extensions and configure the editor to your liking.
Writing code using Visual Studio code in Ubuntu
Installing Visual Studio Code on Ubuntu is a pretty straightforward process. Given the different ways to install packages, you are free to choose any process so that you can download and use the software 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 see which one suits you best.
9 best free code editors for writing your first app
A good code editor can make a programmer's life a lot easier, but which one is best for you?
About the author
(4 articles published)
I have two years of document writing experience for a range of digital marketing firms and software lifecycle documents.
By Gaurav Siyal
Subscribe to our newsletter
Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive offers!
Click here to subscribe