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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
11 views

WSL2 crashed (docker backend and Ubuntu), now Ubuntu starts into root instead of my user

Any WSL2 instances stopped responding to anything, so I ran wsl --shutdown in CMD and restarted the instances. Since then, my Ubuntu instance starts as root instead of my user hardya. This happens if ...
0 votes
0 answers
27 views

Windows Terminal WSL2 profile shortcut not highlighted in taskbar when opened

I have a shortcut for a WSL2 profile in Windows Terminal (Windows 10) pinned to the taskbar. The command is of the form wt.exe -p "Fedora 36" where the profile executes the command wsl.exe ~ ...
1 vote
1 answer
15 views

Verify that config value applied in WSL

WSL configuration can be set in wsl.conf (for distro) or .wslconfig (global) based on the Advanced Settings doc. Is there a way to verify that a value has been applied? Something like echo $propName ...
  • 111
2 votes
1 answer
51 views

How to run a Windows executable (exe) from WSL with root privileges?

The title might not be totally accurate, as my goal is to launch an .exe from a WSL2 shell which itself starts a Linux process inside WSL, and I want said Linux process to be ran as root Goal: Use a ...
  • 21
0 votes
1 answer
40 views

Unable to start elasticsearch service on Ubuntu WSL2

I installed elasticsearch on WSL2 using the command: sudo apt-get update && sudo apt-get install elasticsearch I get the following output: sudo apt-get update && sudo apt-get install ...
  • 1
2 votes
0 answers
37 views

How to access to a SQL Server Instance from a WSL2 Debian System?

I would like to connect from my WSL 2 Debian System to a SQL Server instance. This is because I want to develop an cossplatform app in Python and make some tests. WSL 1 As far as I know with WSL 1 I ...
  • 171
1 vote
0 answers
32 views

Vagrant crashes on WSL

I am trying to run a simple VM in my WSL using vagrant. I am using Ubuntu 22.04 on WSL2 with vagrant version 2.2.19. On my windows (with VirtualBox 6.1.36) i have a simple directory which contains the ...
  • 11
0 votes
1 answer
30 views

What's the difference between `hostip` and `windows ip` when set WSL2 proxy by Clash `Allow LAN`?

I have searched and scanned many blogs or websites for “how to set proxy for WSL2”. Such as here or here. My confusion is, that I find the following 2 ways can both set proxy for WSL2 successfully ...
0 votes
0 answers
41 views

How to restore an old WSL vhdx file

I backed up an Ubuntu 20.04 vhdx file and did a computer cleanup. I would like to get the files in the vhdx or mount the file again. I tried reinstalling the same distribution on my Windows and ...
0 votes
0 answers
49 views

Trouble finding what ports are in use Windows 10 / Docker

I'm using Laravel sail (i.e. docker). After doing a sail up -d I get the following: Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:5173 -> 0.0.0.0:0: listen tcp 0.0....
1 vote
1 answer
32 views

How to check WSL2's virtual machine status?

Per the WSL documentation, WSL2 is a virtual machine on Hyper-V. However, this VM's status is not visible from Hyper-V Manager. How can I check WSL2's virtual machine status? For instance: If it's ...
  • 113
0 votes
0 answers
10 views

VS Code Docker error after switching to linux Docker

Using WSL, I made the switch and unistalled Windows Docker Desktop with WSL2 backend, and installed Docker straight in WSL (Ubuntu). Now in VS Code, I get these Task errors: Error: the task ...
  • 155
1 vote
1 answer
28 views

with wsl2, why do permissions revert back

so i am having issues that are caused by the /tmp directory. i have created /etc/fstab with the following: tmpfs /tmp tmpfs mode=0755,uid=0,gid=0,size=48M 0 0 when i reboot wsl, i get the same issues....
  • 121
1 vote
2 answers
180 views

systemctl commands under WSL

I am running Ubuntu inside Windows using WSL. I receive the following errors when I run scripts with systemctl command: System has not been booted with systemd as init system (PID 1). Can't operate. ...
  • 111
0 votes
0 answers
29 views

WSL not working after system image restore

I recently had to backup and restore my Windows OS and data from a system image. Everything seems to be working fine, except for WSL. Whenever I try to start up my WSL Ubuntu distribution, I get the ...
0 votes
0 answers
23 views

Shift + arrow => ABCD on WSL2

It happens on wsl2 terminal on windows 11. When I typed Shift + <- the output is D instead of moving backward the cursor. The same with other arrows. Shift + -> => C Shift + up => A Shift +...
6 votes
1 answer
112 views

How to refresh System information on wsl2

This is part of the screen info when I open terminal of wsl2. As the time indicates it is 23 days before. How to refresh this info? System information as of Sat Jul 30 22:52:35 CST 2022 System ...
1 vote
1 answer
145 views

How to mount a WSL2 folder as a Network Drive in Windows 10+?

I have created a shared folder in my WSL2 instance (Ubuntu 20.04.4 LTS) which seems to be accessible and working. I created the folder in the /mnt/wsl location. After that, I can access the new folder ...
0 votes
1 answer
91 views

WSL2 ubuntu can access host IP but is unable to access host port [duplicate]

Windows configs: Running a sample web server with port 5000 opened (see picture 1) Windows firewall fully closed WSL2: Can successfully access the Internet and ping windows with host IP or $(...
  • 103
1 vote
1 answer
81 views

Different profiles of the same WSL2 linux instance in Windows Terminal

I've got Ubuntu-22.04 installed in WSL2 on Windows 10. However, there are two Windows Terminal profiles in my settings.json. One of them must have appeared after some update, it was not there from the ...
  • 13
0 votes
0 answers
115 views

How can one use WSL via VS by installing Ubuntu with error-0x80370102 even though the machine already runs a VM without issue?

I am running Win 10 Home and I'm trying to install Ubuntu WSL 22.xx LTS (...something like that) through Visual Studio. After downloading from the Windows Store a popup windows says it's installing ...
1 vote
2 answers
330 views

Kali in WSL 2 cannot start kex in esm mode

I am having issues using kali-win-kex in ESM mode on Kali Linux. I followed instructions for win kex step-by-step as shown on kali.org.(Note that I have carried out this process multiple times before ...
1 vote
4 answers
166 views

How to fix my localhost resolution on Windows?

I was developing a simple react app and wanted to test it on my phone. For that every time I do npm start it runs a react-scripts module that launches the browser to show the project you're doing as ...
1 vote
0 answers
191 views

Can't port forward port 8080 between WSL2 and Windows host, though other ports work fine

I have a Spring webserver running on WSL2 Ubuntu 20.04, which would run on port 8080 by default, and it is to be accessed from other devices on LAN. I did the port forwarding from port 8080 on Windows ...
  • 11
1 vote
1 answer
76 views

Change the storage location of a WSL2

I would like to know how I can change the location where I store the folder that contains the information of a Debian WSL2 container. According to the Microsoft Doc it is located in C:\Users\<...
1 vote
0 answers
75 views

Attach an unknown device to WSL2 with usbipd

I am trying to attach a USB device to WSL2, the device drivers are not present on Windows, and it appears as an unknown device in Settings -> Bluetooth & Other Devices and it appears as ...
  • 111
18 votes
2 answers
4k views

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 ...
0 votes
0 answers
24 views

Vagrant + WSL2 + Hyper-V setup only provides one-directional File synchronization support using `synced_folder`

Environment Windows 10 Enterprise Hyper-V: 10.0.19041.1 Windows Subsystem for Linux 2 (WSL2) with Ubuntu 20.04 Vagrant (installed on Window 10 + WSL2): 2.2.19 Description I have set the Hyper-V to ...
1 vote
1 answer
52 views

Can I install a Linux distro in WLS2 from a bootable USB stick?

I have multiple WSL2 distributions of Linux running side-by-side. I also have this particular Linux distribution that only comes in the form of a bootable USB drive. I can install that distribution on ...
  • 900
1 vote
1 answer
53 views

How to enlarge size of wsl2?

The WSL2 says it uses more than 90% size. System information as of Sat Jul 30 22:52:35 CST 2022 System load: 0.107421875 Usage of /: 90.7% of 250.98GB ...
0 votes
1 answer
90 views

emulator aosp wsl2 segmentation fault on launch

Facing an issue with wsl2 when starting aosp emulator. It was working before and now after some updates it does not work. I'm on WSL2 with uname -a : 5.15.57.1-microsoft-standard-WSL2 I'm starting ...
1 vote
1 answer
43 views

Does WSL1 vs WSL2 make a difference if I were only to use it for SSH connection?

Apologize for being lazy here - if my goal is to simply remote into other servers over SSH, does "upgrading" from WSL1 to WSL2 make a difference in performance? Two main use cases: With ...
  • 953
0 votes
0 answers
30 views

my restart freeze on a black screen on windows 11 when downloading wsl

when i download the wsl and i run it in the power shell (wsl --install)it download but when i restart my laptop freeze at a black screen and it can't restart please help me i've searched every where ...
1 vote
1 answer
253 views

WSL Ubuntu: Cannot start Terminator

I installed WSL Ubuntu 20.04 on Windows 10. I also installed VcXsrv (Xlaunch). I use the command as follows to start VcXsrv: "C:\Program Files\VcXsrv\vcxsrv.exe" :0 -ac -terminate -...
  • 11
0 votes
0 answers
137 views

NAT (in QEMU/KVM) and WSL2 doesn't have internet, but host does

I've tested in 3 differents PC in my network, with Fedora, Arch and Windows None of the guest OS have Internet, nor VirtualBox, QEMU/KVM, and WSL2, but when I use brigde networking or MacVtap option ...
1 vote
0 answers
76 views

Mounting Network Drives not recognised?

I am trying to mount a Network Drive from my Windows PC (Called X: for our purposes). I've done it in the past temporarily and had no issues but it unmounted when I restarted my PC and I'm trying to ...
user avatar
0 votes
0 answers
44 views

How to enable WSL2 , DISM can't find it on my updated Win10

I followed: https://docs.microsoft.com/en-us/windows/wsl/install-manual Here is the output of the first command Deployment Image Servicing and Management tool Version: 10.0.19041.572 Image Version: ...
2 votes
1 answer
168 views

Is there a way to mount an external drive when it becomes available in WSL?

I am using Ubuntu with WSL with a zsh/bash shell. My host OS is Windows 10. I already figured out how to mount a Windows external drive: sudo mkdir /mnt/d sudo mount -t drvfs D: /mnt/d I rarely plug ...
1 vote
1 answer
61 views

Re-login WSL Ubuntu

I have Ubuntu-22.04 installed in WSL2. I changed /etc/environment and, as this answer suggests, I need to log out and log in Ubuntu for the changes to take place. But I'm unable to do so as WSL just ...
  • 113
1 vote
0 answers
110 views

Windows 10 memory usage incorrectly shown in Task Manager after WSL-2 install & uninstalling won't fix it

Why Windows Task manager shows total memory usage higher than the aggregate of memory usage of all the processes? My system has 4GB physical memory. Now it is always around 65% full even if I didn't ...
1 vote
2 answers
96 views

Cannot communicate with Windows localhost from WSL2

I have an application running on Windows on localhost (127.0.0.1) port 8545. My goal is to be able to communicate with this application from within WSL2. However, whenever I try to access the address ...
1 vote
1 answer
474 views

WSL starting in /mnt/c/windows/system32

I installed WSL2 with Ubuntu 20.04 on Windows 10 (21H2 Build 19044.1766) a while back now, but I haven't had a use for it until now. When I start WSL, I wind up in /mnt/c/windows/system32 rather than ...
0 votes
1 answer
227 views

Can't open network manager GUI on WSL2 Ubuntu

I'm trying to open network manager GUI on WSL2 Ubuntu on Windows 11 using the command nm-connection-editor, but it shows the following error: ** (nm-connection-editor:7104): WARNING **: 17:05:24.796: ...
0 votes
1 answer
23 views

ssh'd-to terminal background becomes white only from WSL2

I read email with mutt on an Ubuntu 18 host, which I ssh into. When I ssh from macOS 11 (via iTerm2, if that matters) or from another Ubuntu 18 host, all is well. But when I ssh from WSL2 (running ...
15 votes
1 answer
2k views

WSL typing by itself

I'm having some problems using WSL. If I run WSL as a normal user, the terminal will occasionally start to type by itself. Because of this, using WSL where any input is required (e.g. vi/vim, nano, ...
1 vote
1 answer
131 views

Store WSL files into drive other than C: drive

Just Installed the WSL in Windows 10 for Ubunutu Linux. I was wondering how we can store the data and all the software that we are downloading and using in the WSL to another directory like D: drive ...
1 vote
1 answer
42 views

Move window to right on wsl not working

I have ubuntu-22.04 in wsl-2 and I installed pycharm and xfce4-terminal (I also checked with nautilus) inside it. for some reason I cant move any window to the right or left, neither with the mouse (...
  • 111
0 votes
1 answer
13 views

Why are same-drive relative-path symlinks created with non-Admin WSL under a drvfs mountpoint inaccessible in Windows?

When I try to use the same-drive, relative-path NTFS symlink I created with WSL under a Windows drive / drvfs mountpoint on the Windows side, I get error that it is inaccessible. The symlink has the ...
  • 7,815
1 vote
1 answer
80 views

Setting up WSL1 and WSL2 side-by-side

I've succeeded in installing WSL2 on top of WSL1 that I already had installed following the accepted answer to this question: https://stackoverflow.com/questions/66065419/how-to-run-multiple-wsl2-...
2 votes
1 answer
211 views

WSL has suddenly got no network connectivity

Whatever connectivity-requiring operation I try to do says network is unreachable, even though Windows host accesses internet and local network normally. I'm using a Manjaro distro custom-built from ...

1
2 3 4 5
8