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.

538 questions
77
votes
5 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…
73
votes
3 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
  • 831
  • 1
  • 5
  • 6
60
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,263
  • 2
  • 12
  • 15
45
votes
7 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
  • 2,986
  • 10
  • 35
  • 38
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 Martins Peres
  • 1,327
  • 2
  • 17
  • 33
32
votes
11 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,…
Hball99
  • 421
  • 1
  • 4
  • 3
30
votes
3 answers

how to access 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 vm are using different network adapters. >ipconfig Windows IP…
27
votes
9 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
  • 6,863
  • 35
  • 76
  • 138
25
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
  • 548
  • 1
  • 5
  • 8
22
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…
19
votes
7 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…
ygy
  • 193
  • 1
  • 1
  • 7
18
votes
2 answers

Which Linux kernel do I have in WSL?

I installed WSL 2 with Ubuntu 22.04. When I try to check the WSL kernel in PowerShell, I am getting this result: PS C:\Users\user> wsl --status Default Distribution: Ubuntu-22.04 Default Version: 2 Windows Subsystem for Linux was last updated on…
mans
  • 447
  • 1
  • 7
  • 15
17
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
  • 295
  • 2
  • 6
16
votes
1 answer

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
  • 571
  • 1
  • 2
  • 9
16
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
  • 181
  • 1
  • 3
1
2 3
35 36