Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»IDE»How to Install Visual Studio Code on Ubuntu 22.04

    How to Install Visual Studio Code on Ubuntu 22.04

    RahulBy RahulMay 23, 20224 Mins ReadUpdated:May 23, 2022

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

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

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

    Prerequisites

    In order to install VS Code, you must have sudo privileges or root account access to the Ubuntu 22.04 system.

    Installing Visual Studio Code on Ubuntu

    Visual Studio Code is available as the Snap package as well official apt repository with the Debian package. Choose one of the below methods as per your choice.

    Method 1: Install VS Code Using Apt Repository

    Follow the below steps to install Visual Studio Code on Ubuntu from the official Apt repository.

    1. First of all, execute the following commands to import the GPG key to the system that is used to verify packages before installation:
      curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg 
      sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg 
      
    2. Microsoft official provides an Apt repository for the installation of VS Code on Debian-based systems. 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 
      
    3. Once you successfully added the repository to your system, Execute the following commands to install Visual Studio Code on the Ubuntu system.
      sudo apt update 
      sudo apt install code 
      

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

    The above steps will complete the VS Code installation on a Ubuntu system.

    Rather than above steps, you can also install VS Code from Snapcraft. The installation instructions are below:

    Method 2: Install VS Code Using Snap Package

    The Ubuntu 22.04 already have installed Snapd service. You can directly install the Visual Studio Code on a Ubuntu system with the below-mentioned command:

    sudo snap install code --classic 
    

    The above command will download the latest VS Code snap package and install it on your system. Once the installation is completed successfully, you will see the following output.

    Installing Visual Studio Code on Ubuntu
    Installing Visual Studio Code using Snap

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

    Using the Visual Studio Code

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

    Installing Visual Studio Code on Ubuntu
    Access Visual Studio Code Application

    The Visual Studio Code editor is ready to use.

    How to Install Visual Studio Code on Ubuntu 22.04
    Running Visual Studio Code on Ubuntu

    The Visual Studio Code provides you with a large number of extensions that extends functionality like C#, Python, JavaScript, Google Chrome, etc. Install the required extensions to enhance your working experience with the Visual Studio Code.

    Upgrade Visual Studio Code on Ubuntu

    The VS Code team is actively developing the application. So you will receive security packages, features, or a full software upgrade from time to time. It’s recommended to upgrade VS Code:

    • If you have installed VS Code from Apt repository, execute the following commands:
      sudo apt update && sudo apt install code 
      
    • Snapd users not to worry about manual upgrades. The service automatically upgrade the packages in background.

    Delete (Remove) Visual Studio Code

    • The users have installed VS code from Apt repository can remove packages with the following commands:
      sudo apt remove --purge code 
      sudo apt auto-remove 
      
    • The snap package can be removed with the following command:
      sudo snap remove code 
      

    Conclusion

    In this tutorial, you have learned two steps for the installation of Visual Studio Code on a Ubuntu 22.04 LTS Linux system.

    linux text editor text editor visual studio code
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install Sublime Text 4 on Ubuntu 22.04
    Next Article How To Install Apache Solr 9.0 on Fedora 36/35

    Related Posts

    How to Install Sublime Text 4 on Ubuntu 22.04

    2 Mins Read

    How to Install NetBeans IDE 12 on Fedora 35/34

    Updated:May 16, 20224 Mins Read

    How to Install Notepad++ on Ubuntu 18.04

    2 Mins Read

    How to Install Visual Studio Code on Ubuntu 18.04

    Updated:May 22, 20223 Mins Read

    How to Install Sublime Text 3 on Ubuntu 20.04

    Updated:May 22, 20222 Mins Read

    How to Install NetBeans on Ubuntu 20.04

    Updated:June 16, 20212 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    • How to Install Angular CLI on Ubuntu 22.04
    • How to Install Composer on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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