Categories: Ubuntu 18.04

How to Install Visual Studio Code on Ubuntu 18.04

Visual Studio Code is an optimized, feature rich code editor for building web and cloud application’s. It is developed by the Microsoft team. It includes feature like embedded Git, supports debugging feature, syntax highlighting, intelligent code completion, snippets, and code refactoring.

The Visual Studio code is freely available for most of modern operating systems like Windows, Linux (RPM and Debian installation is also available), and macOS.

Sponsored

This tutorial will help you to install Visual Studio Code on Ubuntu 18.04 LTS Linux system using Apt package manager and using snap package.

Prerequisites

Login to your Ubuntu 18.04 system with sudo privileged account. You must have Ubuntu Desktop installed on your system.

Step 1 – Installing Visual Studio Code

Visual Studio Code is available as the Snap package as well official apt repository with Debian package. Choose one of the below methods as per your choice. The Ubuntu 18.04 does not have Snap tool installed. So, we are providing installation method using Debian package first.

  • 1. Install using Apt Repository

    First of all, Import the GPG key to your system to verify packages before installation. To import gpg key, type:

    curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg  sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg 

    Microsoft team provides an repository for the Debian packages installation. To enable the Visual Studio code Apt repository, type:

    echo "deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main" | sudo 
       tee /etc/apt/sources.list.d/vs-code.list 

    Once you successfully added the repository to your system, Execute the following commands to install Visual Studio Code on Ubuntu system.

    sudo apt update  sudo apt install code 

    Press ‘y’ for any confirmation prompted by the installer.

    Sponsored
  • 2. Install using Snap Package

    The snap package contains all the requirements for any application. Make sure you have Snapd service installed on your system or use the following command to install it.

    sudo apt install snapd 

    Once snpad deamon installed on your system, execute the below command on your system terminal:

    sudo snap install code --classic 

    The above command will download VS Code snappackage and install on your system. Once the installation completed successfully, you will see the following output.

    That’s it. The Visual Studio Code snap package has been successfully installed on your system.

Step 2 – Launch Visual Studio Code

Now, The Visual Studio Code has been installed on your Ubuntu 18.04 system. To launch the application type “code” in search application and click on it.

The Visual Studio Code editor is ready to use.

There are a large number of extensions available for Visual Studio Code like C#, Python, JavaScript, Google Chrome etc. Install the required extensions to enhance your working experience with the Visual Studio Code.

Conclusion

This tutorial helps you to install Visual Studio Code on your Ubuntu 18.04 LTS Linux system.

The post How to Install Visual Studio Code on Ubuntu 18.04 appeared first on TecAdmin.

Ubuntu Server Admin

Recent Posts

Building RAG with enterprise open source AI infrastructure

One of the most critical gaps in traditional Large Language Models (LLMs) is that they…

4 hours ago

Life at Canonical: Victoria Antipova’s perspective as a new joiner in Product Marketing

Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…

1 day ago

What is patching automation?

What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…

2 days ago

A beginner’s tutorial for your first Machine Learning project using Charmed Kubeflow

Wouldn’t it be wonderful to wake up one day with a desire to explore AI…

3 days ago

Ubuntu brings comprehensive support to Azure Cobalt 100 VMs

Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…

3 days ago

Ubuntu Weekly Newsletter Issue 870

Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…

4 days ago