Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2797

How do you install VS Code in Windows Subsystem for Linux 2?

$
0
0

how do you specifically install VS Code in WSL 2 using Ubuntu distro. It seems it doesn't work for me. Visual Studio Code is officially distributed as a Snap package in the Snap Store. However, when I try to run:

sudo snap install --classic code # or code-insiders

And then, this happen to me:

enter image description here

Because of this, I have one option, and since I am using Ubuntu, the easiest way to install Visual Studio Code for Ubuntu based distributions is to download and install the .deb package (64-bit), either through the graphical software center if it's available, or through the command line with:

sudo apt install ./<file>.deb
sudo apt install apt-transport-https
sudo apt update

And it is working pretty fine for me, and it was installed and updated correctly:

For sudo apt install ./<file>.deb:

enter image description here

For sudo apt install apt-transport-https:enter image description here

For sudo apt update:

enter image description here

However, the final requirement based on the documentation is to run:

sudo apt install code

But this doesn't work for me as I always receiving this error:

E: unable to locate package code

Am I missing on the documentation? You can check it out here: https://code.visualstudio.com/docs/setup/linux. I am pretty sure I followed the documentation correctly but It doesn't work for me so I actually missed something, maybe out of the documentation.


Viewing all articles
Browse latest Browse all 2797

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>