How to Install Visual Studio Code on Ubuntu
Hi, Friends in this tutorial we are going to install Visual Studio Code on Ubuntu. As all of you know Visual Studio Code is a free source-code editor made by Microsoft for Windows, Linux, and macOS. It has exclusive Features of debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. Also, it has thousands of plugins support which makes VScode very popular.
And it’s one of the widely-popular code editors that are highly used by full stack and Front-end developers. The main reason behind its popularity is that it has everything which any programmer expects from any code editor with some additional and useful features. Its lightweight, fast, open-source, and cross-platform nature along with other cool features gives it an extra edge over any other editor.
As per the stack overflow survey 2019, it has almost 51% share that’s really impressive. Stack Overflow Servey Insights
In this tutorial, we will show two ways of installing Visual Studio Code on Ubuntu 20.04. VS Code can be installed as a deb package from Microsoft repositories or snap package via the Snapcraft store. Choose the installation method that is most appropriate for your environment.
Installing Visual Studio Code with the apt package manager:
VS Code is available from the official Microsoft apt repositories. To install it, follow the steps below:
Update the packages index and install the dependencies by running the following command as a user with sudo privileges :
sudo apt update sudo apt install software-properties-common
Import the Microsoft GPG key using the following wget command :
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
And enable the Visual Studio Code repository by typing:
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
Once the apt repository is enabled, install the Visual Studio Code package:
sudo apt install code
When a new version is released you can update the VS Code package through your desktop standard Software Update tool or by running the following commands in your terminal:
Starting Visual Studio Code
- In the Activities search bar type “VS Code” and click on the icon to launch the application.
- When you start VS Code for the first time, a window like the following should appear:
- VS Code can also be launched from the command line by typing
Installing Visual Studio Code as a Snap Package:
Visual Studio Code snap package is distributed and maintained by Microsoft. Snaps are self-contained software packages that include the binary all dependencies needed to run the application. Snap packages are easy to upgrade and secure. Unlike the standard deb packages, snaps have a larger disk footprint and longer application startup time.
Snap packages can be installed from either the command-line or via the Ubuntu Software application.
To install the VS Code snap, open your terminal (
Ctrl+Alt+T) and run the following command:
sudo snap install --classic code
That’s it. VS Code has been installed on your Ubuntu machine.
If you prefer using a GUI, open Ubuntu Software, search for “Visual Studio Code” and install the application:
We’ve explained how to install the VS Code on Ubuntu 20.04.
You can now start installing new extensions and customizing your workspace. To learn more about VS Code visit their official documentation page. If you have any questions, please leave a comment below.
Latest posts by Subroto Mondal (see all)
- Installing and Configuring OpenShift: A Step-by-Step Guide for Linux Experts with Terminal Code - February 19, 2023
- Sed Command in Linux with Practical Examples - February 19, 2023
- Rsync Command uses with examples - February 19, 2023