Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»IDE»How to Install Visual Studio Code on Ubuntu 20.04

    How to Install Visual Studio Code on Ubuntu 20.04

    By RahulMay 4, 20203 Mins ReadUpdated:June 18, 2021

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

    Advertisement

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

    This tutorial will help you to install Visual Studio Code editor on Ubuntu 20.04 using Apt repository as well as the snap tool.

    Prerequisites

    Before continuing for Visual Studio Code installation on Ubuntu 20.04:

    • Login to Ubuntu as sudo privileged user
    • For the newly installed systems, required to complete initial server setup

    Step 1 – Install Visual Studio Code

    Choose one of the below methods to install Visual Studio Code on your Ubuntu system. The Ubuntu 20.04 LTS preferred to use snap tool instead of Apt for packages installation. So, we are providing installation method with snap tool first.

    • Method 1 – How to Install VS Code using Snap

      The snap package contains all the requirements for any application. So just execute the below command on your system terminal:

      sudo snap install code --classic
      

      It will download the eclipse IDE snap package and install on your machine. Once the installation completed successfully, you will see the following output.

      install vs code ubuntu

      The snap package has been installed on your system.

      Next method will instruct you to install visual studio code using the apt package manager. But if you already have installed using snap tool, skip next method.

    • Method 2 – How to Install VS Code with PPA

      First, 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
      

    Step 3 – Launch Visual Studio Code

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

    launch vs code ubuntu

    The Visual Studio Code editor is ready to use.

    Visual Studio Code on Ubuntu

    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 20.04 LTS system.

    code code editor Ubuntu 20.04 visual studio code
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Format Source Code in Visual Studio Code

    How to format source code in Visual Studio Code (VSCode)

    How to Install VS Code on Ubuntu 22.04

    How to Install Visual Studio Code on Ubuntu 22.04

    Top 10 Open Source Linux Code Editors

    10 Best Open Source Linux Code Editors

    View 1 Comment

    1 Comment

    1. Ben on June 1, 2020 6:30 pm

      Thank you for this tutorial, sir. I used the first method and it worked without problems.
      When it comes to snap vs apt, which one should be preferred?

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Error: EACCES: permission denied, scandir (Resolved)
    • How To Install Python 3.11 on Ubuntu 22.04 / 20.04
    • How to Install Python 3.11 on Amazon Linux 2
    • An Introduction to the “./configure” Command: Compiling Source Code in Linux
    • How to Install PHP 8.x on Pop!_OS
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.