Questions tagged [wsl-2]

This tag should be used for question about Windows Subsystem for Linux version 2. It should not be used for WSL version 1.

From the Microsoft docs:

WSL 2 is a new version of the architecture in WSL that changes how Linux distros interact with Windows. WSL 2 has the primary goals of increasing file system performance and adding full system call compatibility. Each Linux distro can run as a WSL 1, or a WSL 2 distro and can be switched between at any time. WSL 2 is a major overhaul of the underlying architecture and uses virtualization technology and a Linux kernel to enable its new features.

WSL provides a way to run linux binaries under Windows 10.

WSL 2 is stored in a single file and has it's own IP address while WSL 1 is stored in multiple files and shares an IP address with the host.

WSL 2 can access files in it's own directory structure faster than WSL 1 but it is slower with Windows files.

The guide for installing WSL2 can be found here.

1587 questions
0
votes
0 answers

Can't connect in SQL Server database using VPN and WSL2

I'm using OpenVPN to connect in my work database, if I connect in VPN and ping in the IP of the database, it looks like everything is right. But when I try to connect via PHP sqlsrv_connect, doesn't work (return false). Ping in database…
0
votes
1 answer

'apt-get clean' returns error in Ubuntu 20.04 LST with WSL2

apt-get clean returns errors E: Could not open lock file /var/cache/apt/archives/lock - open (13: Permission denied) E: Unable to lock directory /var/cache/apt/archives/ E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission…
0
votes
1 answer

npm\bin\npm-cli.js not found on WSL2 Ubuntu

I have a weird issue with npm and JHipster using WSL2 (Ubuntu) over Windows 10 Launching ./mvnw on WSL2 give me the following error [INFO] > npm run cleanup && npm run webpack:build:main [INFO] [INFO] internal/modules/cjs/loader.js:985 [INFO] …
Carlos Garces
  • 829
  • 1
  • 11
  • 24
0
votes
1 answer

VSCode not connecting to WSL20.02 when @import Sass partials

For some reason whenever I begin to type the file path after an @import rule in my main.scss file, VSCode disconnects from WSL2. I am using WSL2 version 20.02 on Windows 10. VSCode is Version 1.54.1 (user setup). I am pretty new to all this. I am…
0
votes
0 answers

Why is php artisan migrate resulting " Illuminate\Database\QueryException SQLSTATE[HY000] [2002] Connection refused "

I was trying to set up a Laravel project but whenever I hit php artisan migrate it results in this error Illuminate\Database\QueryException SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where…
tensorMan
  • 17
  • 6
0
votes
1 answer

wsl2-GUI-emacs open file with explorer.exe instead of xdg-open

I am working on wsl2+emacs GUI version with VcxSrv window manager server. Within the GUI version, emacs does not open files with windows-app as it does in wsl2-terminal-emacs. Take an example: on dired window, I strike key & invoking…
AbstProcDo
  • 19,953
  • 19
  • 81
  • 138
0
votes
0 answers

Docker on WSL2: Volumes always anonymously

Anybody have an idea why the following is not true anymore? I have W10 20H2, Docker V 20.10.2 And WSL 2 is enabled and works. Fact docker volume create blah creates a folder…
Egbert Nierop
  • 2,066
  • 1
  • 14
  • 16
0
votes
2 answers

how to solve the extited code 139, for run the image cloudera/quickstart, in docker with WSL2 Ubuntu?

I'm using WSL2 with Ubuntu 20.04 distribution, and I was trying create a container in Docker with the Following command: docker run --hostname=quickstart.cloudera --privileged=true -it -v $PWD:/src --publish-all=true -p 8888:8888 -p 8080:8080 -p…
0
votes
1 answer

How can I get access to files transferred from Windows to WSL-2 Ubuntu?

I have a Linux subsystem installed on my Windows machine. I've transferred a tar.gz file I want to access by finding the location of my subsystem and dragging the files over. But when I run the command: tar -zxvf file_name.tar.gz I get the…
Eli Rees
  • 178
  • 2
  • 14
0
votes
0 answers

Cant see include .h file symbols with intellisense, C project in WSL2

I am opening a C project directory in WSL2 using VS Code. I have the C/C++ 1.21 extension installed, and Remote-WSL 0.53.4. All my .h files are there in the project explorer. The source .c file being edited has an #include "includes.h" which…
TheBard
  • 156
  • 1
  • 11
0
votes
1 answer

Access mongo database running on docker in WSL2 using Mongo Compass

I'm working on a project that uses a mongo database running on docker. When I run the project on windows 10, I can perfectly connect to my db via Mongo Compass using the standard connection string:…
Erwol
  • 1,911
  • 2
  • 23
  • 28
0
votes
0 answers

Why does react-app (in typescript) cannot hot reload upon editing

There are three cases. All occur on Window 10 WSL Ubuntu: I created a new React app with --template typescript this week. After yarn starting, all kinds of editing do not trigger any hot reloading at all. I yarn started an old React app (created…
0
votes
0 answers

How does my Windows computer running WSL2 know which OS kernel to run a program on?

How does my Windows computer that is running WSL2 know which OS kernel (Windows or Linux) to execute a program with? I know that WSL2 is essentially a lightweight VM but idk how to leverage this knowledge. I thought it might depend on whether or not…
0
votes
1 answer

can't connect to WSL2 after after executing wsl several times

Environment Windows10 home ▼WSL info //Powershell > wsl -l -v NAME STATE VERSION * Ubuntu-18.04 Running 2 ▼.wslconfing setting set .wslconfig file on C:\Users\…
kazon
  • 344
  • 1
  • 4
  • 15
0
votes
1 answer

Windows shell vs WSL2 Typescript diagnostics parse time

Can someone explain the parse time difference between Windows shell and WSL2 under the same system below when running the same command under the same project? As you can see there are also some differences in Files, Lines etc. Is there any way to…
Maverick
  • 1,105
  • 12
  • 41