How to install vscode on Ubuntu 20.04?

Overview

Visual Studio Code (VS Code) is a free and open-source source code editor developed by Microsoft for Windows, Linux, and macOS. It offers a variety of features and extensions that make it a popular choice among developers for editing, debugging, and managing code.

One of the key features of VS Code is its ease of customization. The editor can be tailored to fit the specific needs of each developer, with the ability to install and configure extensions, themes, and other settings. The integrated terminal allows developers to run commands, debug code, and perform other tasks without leaving the editor.

To install Visual Studio Code on Ubuntu 20.04, follow the steps given below.

Prerequisites

There are certain prerequisites that need to be met before you begin.

  • Ubuntu 20.04-equipped system

  • A sudo-privileged user account

  • Internet connection

  • Knowledge of CLI

Get Started

Step 1: Update and upgrade the package list by running the following command:

sudo apt update
sudo apt upgrade

When prompted to continue, enter 'y'.

Step 2: Install the dependencies necessary to run Visual Studio Code by running the following command:

sudo apt install software-properties-common apt-transport-https wget

Enter 'y' to continue.

Step 3: Download and add the Microsoft GPG key to the system:

wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -

Step 4: Add the Visual Studio Code repository to your system:

sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"

Step 5: Update the package list again:

sudo apt update

Step 6: Finally, install Visual Studio Code by running the following command:

sudo apt install code

When prompted to continue, enter 'y'.

Step 7: Verify the installation using the following command:

code --version

Step 8: Uninstall vscode by running:

sudo apt remove code

Enter 'y' to proceed with the uninstallation.

Conclusion

This tutorial demonstrates how to install and remove vscode on Ubuntu; once successfully installed, you can then use vscode to simply create and change the code.

Last updated