Questions tagged [wsl2]

WSL2 is the second release of the Windows Subsystem for Linux, a feature of Windows which enables multiple Linux distributions and tools to run natively in Windows.

WSL2 is the second release of the Windows Subsystem for Linux, a feature of Windows which enables multiple Linux distributions and tools to run natively in Windows.

Super User is often the most appropriate Stack Exchange site for WSL2 questions, especially if you think your question is mostly related to Windows functionality. However, also consider whether some other Stack Exchange sites may be a better fit for your question:

  • If your question involves development on WSL2, or the use of development tools with WSL2, the programming expertise on Stack Overflow may be warranted.

  • If you think your question may be more related to Linux functionality, you may find the Unix & Linux Stack a better fit.

  • If you are using an Ubuntu distribution on WSL, and you think your question may be unique to Ubuntu functionality, then Ask Ubuntu provides access to Ubuntu expertise that may be able to help.

If you just aren't sure, then feel free to go ahead and ask here on Super User.

In all cases, it's recommended that you mention WSL2 in your question. Since the WSL2 and windows-subsystem-for-linux tags are sometimes used incorrectly, it is helpful to confirm that you are actually asking a WSL-related question.

We would also recommend confirming that you are using WSL2 by executing wsl -l -v from PowerShell or CMD. Often an older WSL1 distribution has not been updated to WSL2.

We also recommend that you include the version/build of Windows you are using in your question.

698 questions
156
votes
9 answers

How do I get back unused disk space from Ubuntu on WSL2?

I'm using Ubuntu 20.04 on WSL2 on Windows 10, and I noticed that after removing files on Ubuntu I was not getting the space back that was taken up by the removed files. For example: Before I deleted files on Ubuntu it showed on Windows explorer that…
106
votes
4 answers

Docker on Hyper-V vs WSL 2

I'm using Docker Toolbox, recently I got to know about the Docker installation using WSL 2. What are the differences between Hyper-V and WSL 2? Which has better performance?
Vinod Sai
  • 1,161
93
votes
9 answers

Move WSL2 file system to another drive

As opposed to in WSL1, official docs for WSL2 state clearly that I should place files I access frequently from Linux under the Linux file system. However, I have not found any docs on settings for where inside the Windows file system the Linux file…
Tomas Aschan
  • 3,556
75
votes
5 answers

How to find WSL2 machine's IP address from windows

This question is related to my question about making a WSL2 address static. Since that looks like it isn't possible I am trying to come up with a workaround. I am thinking I can run a shell script in WSL2 at boot that will write the WSL2 machine's…
Nick
  • 1,533
  • 2
  • 14
  • 15
63
votes
5 answers

Accessing Windows localhost from WSL2?

I have Windows 11 with WSL2 (Ubuntu) installed on it. I've setup a gdb listener server on my Windows localhost and want to access it from Wsl2, but it seems my Windows machine and WSL are using different network adapters. >ipconfig Windows IP…
62
votes
14 answers

No internet connection Ubuntu-WSL while VPN

I have a Ubuntu-20.04 Version 2 WSL running on my Windows 10 Laptop. Everything works fine, I have internet connection. But only as long as I am not connected to a VPN network. If I connect to my the network of my university using Cisco AnyConnect,…
57
votes
3 answers

How can I update the kernel in WSL2 kernel to latest release?

The current kernel version in my WSL2 subsystem is: 5.10.60.1-microsoft-standard-WSL2 However, I see in the official Microsoft WSL GitHub repo there is a newer version of the kernel: linux-msft-wsl-5.10.102.1 How can I update the kernel in my…
sjrm
  • 868
42
votes
3 answers

Docker WSL 2 installation is incomplete

After substituting Docker Desktop on Windows 10 with a more recent version, clicked to start it and got the following error WSL 2 installation is incomplete The WSL 2 Linux kernel is now installed using a separate MSI update package. Please click…
Tiago Peres
  • 1,497
39
votes
2 answers

Error code: Wsl/Service/CreateInstance/MountVhd/ERROR_FILE_NOT_FOUND

I have uninstalled wsl on my windows 11 and trying to re-install using wsl --install. After restart i am getting following error Failed to attach disk…
kshashank
  • 1,199
38
votes
3 answers

How to reset my WSL Ubuntu password?

I forgot my WSL Ubuntu password, needed to run sudo command. After running the folowing command lead@kernel:~$ sudo su I got this Sorry, try again Any alternatives? Thanks
34
votes
2 answers

What is this weird process I see in WSL called “plan9?”

I'm using WSL2 with Ubuntu on Windows 11 and there is a weird process called plan9 I see with htop. Here is a picture of it. ps ax output: 4 ? Sl 0:00 plan9 --control-socket 5 --log-level 4 --server-fd 6 --log-truncate Can anyone…
Zekel7
  • 361
34
votes
11 answers

can't access 127.0.0.1:80 outside of WSL2 / Ubuntu 20.04

I'm running Ubuntu 20.04 on WSL2 / Hyper-V / Windows 10. When I do curl http://127.0.0.1 inside Ubuntu I get this back: 301 Moved Permanently

301 Moved…

neubert
  • 7,574
  • 39
  • 94
  • 156
29
votes
2 answers

Cannot run WSL2 over SSH on Windows 11

I have two machines; a desktop and a laptop. The desktop runs WSL2 and an OpenSSH server on the Windows side. I'm able to connect to the SSH server from the laptop without any problems but not able to start WSL over the SSH connection. When I run…
Isak
  • 425
27
votes
8 answers

How to connect wsl to a windows localhost?

I'm trying to let WSL use a localhost proxy(actually its Fiddler) on my windows, but I can't see any connection like that, and downloads usually fail, how do I fix that? I know that I can connect to Linux localhost from the windows one, but how can…
24
votes
2 answers

Are Windows WSL2 "distributions" just docker containers under the hood?

I found this document on github: WSL2 Distributions Run As Containers It hasn't been updated in a while though, so I'm wondering if anyone knows whether or not Microsoft has published a technical document yet that describes the implementation of…
StackExchanger
  • 433
  • 1
  • 4
  • 10
1
2 3
46 47