• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Install Visual Studio Code in Ubuntu & Debian

Written by Rahul, Updated on March 31, 2020

Visual Studio Code is a lightweight source code editor for JavaScript, TypeScript and Node.js Applications. It also has extensions for multiple other programming languages like C++, C#, Python, PHP, Go, etc. This tutorial will help you to install Visual Studio Code editor on Ubuntu, Debian, Linuxmint and its derivatives systems.

  • Install Mono Framework on Ubuntu
Note: Visual Studio Code is Different that Visual Studio IDE

Step 1 – Enable Package Repository

First of all, You need to enable package repository in your system. Run the following command to enable Visual studio code repository to your system.

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

Step 2 – Install Visual Studio Code Editor

Now, Import the package signing gpg key on your system using the following command.

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

After importing gpg key, Let’s use below commands to install Visual Studio Code on your Debian based system.

sudo apt-get update
sudo apt-get install code

Step 3 – Launch Visual Studio Code

Now launch the Visual Studio Code editor on your system using the graphical menu. After that create a new file or open files and directories using the File menu.

Visual Studio Code Editor

Step 4 – Enable Required Extensions

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 Visual Studio Code.

Visual Studio Code Editor

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

9 Comments

  1. Avatar armel sanou Reply
    August 2, 2019 at 12:38 pm

    Very good thanks.

  2. Avatar Mariappan Reply
    April 16, 2019 at 2:13 am

    I am getting this error

    [email protected]:/etc/apt/sources.list.d$ sudo curl https://packages.microsoft.com/keys/microsoft.asc | gpg –dearmor > microsoft.gpg
    bash: microsoft.gpg: Permission denied
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 983 100 983 0 0 3824 0 –:–:– –:–:– –:–:– 3810
    (23) Failed writing body

    • Avatar Gudbro Reply
      August 3, 2019 at 7:43 pm

      Thank you.

  3. Avatar Pavan Reply
    April 11, 2019 at 6:02 am

    good….!!!

  4. Avatar Venkatesh Reply
    April 3, 2019 at 12:54 pm

    We don’t have permission to create a file in that specified directory /etc/apt/sources.list.d/

  5. Avatar Dot Net Reply
    December 7, 2018 at 7:07 am

    I am obliged for this article Rahul, I was trying to download visual studio in ubuntu for office work. I am glad I reached your article in perfect time. It helped me to do it in easy way.

  6. Avatar Sanjay Reply
    November 25, 2018 at 4:54 pm

    Strangely there are no literature or documents found on step by step VS code installation on an Ubuntu server (AWS EC2 server) through the command line (ssh interface). The closest I got was this website. Rahul – can you please confirm these are the right set of instructions to insall VS code on an Ubuntu EC2 server through ssh ?

    1. Create a new file /etc/apt/sources.list.d/vscode.list
    2. Add a new line deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main
    3. Run the following 4 commands

    curl https://packages.microsoft.com/keys/microsoft.asc | gpg –dearmor > microsoft.gpg
    sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
    udo apt-get update
    sudo apt-get install code

    Usually, ubuntu package installation is straightforward using apt install. This looks like a bit of a drain. Any reasons for the long drawn process assuming this is the correct process?

  7. Avatar sumit dhar Reply
    November 24, 2017 at 8:11 am

    i was installing visual studio but it is showing error”E: ailed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry ‘main/binary-i386/Packages’ in Release file (Wrong sources.list entry or malformed file)

    E: Some index files failed to download. They have been ignored, or old ones used instead.”

    • Rahul Rahul K. Reply
      November 26, 2017 at 7:54 am

      This is Google chrome deb repository, which is showing this error. Just remove entry for chrome repository.

Leave a Reply Cancel reply

Popular Posts

  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy