2022 Developer Survey is open! Take survey.

Questions tagged [windows-subsystem-for-linux]

Windows Subsystem for Linux is a compatibility layer that allows Linux binaries to run natively on Windows 10.

Filter by
Sorted by
Tagged with
1 vote
0 answers
6 views

How do I set environment variables so that they execute when calling WSL from PowerShell?

First let me clarify the question. I'm not asking how to sync environment variables. What I am asking is how to set JAVA_HOME so that when I call wsl echo `$JAVA_HOME from powershell it writes out the ...
user avatar
0 votes
0 answers
9 views

SSH session is different from local

I m connecting to my WSL Ubuntu through SSH everyting works fine except mounts environnement When I am in Ubuntu locally, all windows drives are mounted in /mnt (local or network drives) but if I ...
user avatar
0 votes
1 answer
131 views

WSL-Docker: curl: (60) unable to get local issuer certificate

After a PC reconfiguration I am unable to use Docker properly, since some curl commands are rejected due to SSL/TLS issues. In just one example curl -vfsSL https://apt.releases.hashicorp.com/gpg ...
user avatar
1 vote
0 answers
35 views

Nginx -- Can't use mDNS domain name in upstream server

Minimal example Machine A and B, where B uses mDNS with domain name b.local and set ssh service at port 2222. A and B does not turn on firewall. In machine A's nginx.conf: stream { upstream b-ssh {...
user avatar
  • 111
0 votes
0 answers
17 views

Cryptomator Volume on WSL

One of my main volumes on Windows, P:, gets encrypted with Cryptomator. I then unlock the vault’s contents via X:, which I want to access using WSL. I am opening the installed Ubuntu 20.04 WSL distro ...
user avatar
  • 13
0 votes
0 answers
74 views

gcloud compute commands sometimes getting stuck in WSL

I am running various gcloud compute commands from the linux subsystem on Windows 11 using Debian. In general, it works great. However, sometimes the gcloud command simply does not return, even after ...
user avatar
1 vote
0 answers
33 views

github not accepting private SSH Key

I have a Private ED25519 SSH key, on a Windows system (using WSL). Permissions of the private key are 400 and permissions on the Public Key are 444. When I test my connection, using ssh -Tvvv git@...
user avatar
0 votes
0 answers
19 views

Accessing remote database from Windows machine

I tried to connect to a remote MySQL instance from my script in WSL2 but it always failed. I tested using the following command Test-NetConnection -ComputerName my-db.com -Port 3306 from PowerShell v7 ...
user avatar
  • 101
2 votes
0 answers
258 views

WSL2 Dockerized Nginx not available in browser, but ping respond

I have a Windows 10 Home on my computer with WSL2. In WSL I run Docker with this docker-compose.yml file: version: "3" services: httpd: image: 'nginx:stable-alpine' ports: - '...
user avatar
  • 121
0 votes
0 answers
34 views

Python interpreter history in anaconda doesn't work

I'm using Python under Anconda in Ubuntu running on WSL2. When I use arrow keys to go through the command history control characters (I assume) are printed instead of showing the previous commands: ...
user avatar
0 votes
1 answer
70 views

nginx throwing 502 Bad Gateway after a period of time

We have a problem with our Nginx instance on Ubuntu (WSL) running on Windows 2019 server. We are using it as a load balancer. It works fine but after a period of time Nginx starts throwing 502 bad ...
user avatar
  • 101
0 votes
0 answers
116 views

WSL PING "system error"

I have a weird PING error in WSL2, Ubuntu 20.04 distribution. When I'm doing nslookup - all ok: root@i:~# nslookup google.com Server: 172.19.224.1 Address: 172.19.224.1#53 Non-...
user avatar
  • 3
0 votes
1 answer
47 views

PHP socket connection through XR300 router to a receipt printer

I have a PHP application which is attempting to open a socket connection to a printer through my router. A couple things to note - my networking skills are lacking so I may be missing something ...
user avatar
  • 103
0 votes
0 answers
120 views

Cannot clone a bitbucket.org project to Linux Ubuntu via WSL in a Windows10

So I try to clone a project via Visual Studio Code using a Linux Machine connected with WSL in my Windows System. I get the error "fatal: unable to access '.....git/': Failed to connect to ...
user avatar
  • 13
2 votes
3 answers
3k views

How to access service running on host from WSL2 (connection refused)

I have selenium running on my host machine, and my app is inside a docker container (inside WSL2). I am trying to get the app connect to the selenium, that is listening on port 4445. It used to work a ...
user avatar
  • 283
0 votes
0 answers
532 views

How to give each WSL distro a distinct IP address?

How to give each WSL distro a distinct IP address, and then connect to those IP addresses via Windows? I was curious if its possible to setup two different ubuntu distributions using WSL and somehow ...
user avatar
  • 101
0 votes
0 answers
302 views

network issue with wsl2, nslookup works, but ping fails

I am facing bad network issue with networking on windows10 machines. tried most of the solutions available over internet. yet there is no solution. Solutions tried - Solutions related to enabling ...
user avatar
0 votes
1 answer
234 views

Unexpected remote arg when using link-dest in rsync

I have a backup script on my WSL Ubuntu that I use manually to backup my linux systems to a USB drive (NTFS volume mounted on WSL). I'm running into an issue with --link-dest that I haven't had before ...
user avatar
2 votes
1 answer
2k views

cURL can connect to localhost but browser cannot

My system is Win10 with WSL2, I ran a gogs docker container (from ubuntu in WSL): 83b2a8833235 gogs/gogs "/app/gogs/docker/st…" 17 minutes ago Up 17 minutes 0....
user avatar
  • 123
1 vote
0 answers
152 views

bash over Windows SSH is not working

I have been using an OpenSSH client on Windows for a long time and an SSH server on Linux. Recently I have decided to use the OpenSSH server on Windows 10. I can install it, run the server and login ...
user avatar
1 vote
1 answer
176 views

Connect to Postgres running on the Windows host from WSL2?

I am trying to connect to PostgreSQL DB installed on my windows machine from WSL2 however facing issues while connecting would appreciate if you can help me resolve this issue. In addition to that I ...
user avatar
  • 111
0 votes
1 answer
876 views

Cannot bind port 111 on docker on WSL2 on windows, but port is (apparently?) currently free

Setup I have this setup: Windows 10 pro with WSL2 with an Ubuntu 20.04 inside. Inside the Ubuntu, I have a running docker engine that has been working perfectly for over during months, exposing ...
user avatar
1 vote
0 answers
710 views

Enable bidirectional UDP communication between Windows host and Docker container

I have a UDP server on a Windows 10 host, on a fixed port (let's say 1234). All I want is to set up a communication between this server and a client in a Docker (Debian-based) container (Docker ...
user avatar
0 votes
0 answers
26 views

After a random period of time, Windows is unable to see services running on my Linux subsystem and vice versa

I am running an Ubuntu 18.04 Linux Subsystem. I have Postgresql 12 running on Linux, and I connect to this from my apps I am developing in Windows. When I start up my PC, everything works fine.. DB ...
user avatar
1 vote
0 answers
2k views

Accessing WSL2 From Public IP Address

I have installed WSL2 with Ubuntu 20.04 on Windows 10. I have an Apache server running in WSL2, and this works fine when I use a browser in Windows (Chrome) to access it via WSL IP address. As the ...
user avatar
  • 13
1 vote
0 answers
248 views

The disk \\.\physicaldrive1 was attached from WSL2, but failed to mount (error code: -22)

Environment: Build: 21343 Ubuntu 20.04 WSL2 Currently attempting to mount an ext4 drive via WSL2 and keep receiving error: The disk \\.\physicaldrive1 was attached from WSL2, but failed to mount (...
user avatar
  • 11
0 votes
0 answers
116 views

WSL & VcXsrv mouse not functional

I have WSL set up on a WINDOWS 10 PRO machine which I generally use for development. And I have gotten X apps to display properly within the windows WM and everything seemed fine; however, no matter ...
user avatar
3 votes
1 answer
4k views

Wsl ubuntu virtualhost and hosts file on windows

I try to access it through my windows browser and fail. what is my mistake? I use WSL2 on windows 10, with ubuntu 20. I have an apache server and a laravel app which I installed at /var/www/law In my ...
user avatar
  • 139
1 vote
1 answer
255 views

win32 openssh default shell wsl.exe command arguments

Environment: Windows 10.0.21327 wsl2, ubuntu 20 LTS win32-openssh Windows Openssh Default shell changed to: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\OpenSSH\DefaultShell C:\WINDOWS\System32\wsl.exe ...
user avatar
-2 votes
1 answer
1k views

How can I connect AWS by using AWS-CLI in Windows Subsystem Linux?

I am totaly new for AWS I am trying to use awscli by calling below code : root@DESKTOP-QK5VI8R:~# aws s3 ls I applied lots of solution for that: I added port 8888 into Inbound/Outbound Rule set in ...
user avatar
  • 97
2 votes
4 answers
13k views

Git, WSL2, SSH: unexpected disconnect while reading sideband packet

While attempting to clone a remote Git repo using SSH I got the following error: git clone user@remote-repo:project.git . remote: Counting objects: 187444, done. remote: Compressing objects: 100% (...
user avatar
0 votes
2 answers
77 views

SSH Connection Error: buffer_put_cstring: s == NULL [preauth]

I'm trying to connect via SSH to a remote SUSE Linux Enterprise Server 11 from a Windows 10 Computer. When using Putty 0,73, it works without problems. But using WSL2/Debian I get always refused. On ...
user avatar
  • 123
1 vote
1 answer
67 views

Speed issue on using Linux subsystem search on a Windows server [closed]

I'm performing a search on a Windows server, who has a mapping to my Z:-drive (\\<servername>\<base_directory>). In there I would like to search inside a subdirectory, so we get Z:\<...
user avatar
  • 111
1 vote
2 answers
1k views

iptables-legacy cannot load NFQUEUE targets and the --queue-num and --queue-bypass options are unknown options

I am trying to run the following iptables command from https://github.com/farukuzun/notsodeep on ubuntu 20.04.1. iptables -A INPUT -p tcp --tcp-flags SYN,ACK SYN,ACK --sport 443 -j NFQUEUE --queue-num ...
user avatar
0 votes
1 answer
81 views

Simulate or have VcXsrv system menu on WSL

I have a debian package which wants to install a system menu icon. Installation failed, and now deinstallion also fails with: xdg-desktop-menu: No writable system menu directory found. The situation ...
user avatar
3 votes
3 answers
5k views

How to run KVM nested in WSL2 (or vmware)?

I'm trying to follow this tutorial to run KVM nested in WSL 2, but after following the directions through compiling the kernel and loading it, the test kvm-ok reports that KVM is not supported. I've ...
user avatar
  • 233
17 votes
1 answer
8k views

How to manually trigger an update of /etc/hosts in WSL? [closed]

When I start the first WSL terminal (ubuntu 20.04 bash in my case), WSL generates the /etc/hosts file based on the host file of my windows system %WINDIR%\System32\drivers\etc\hosts. If I now change ...
user avatar
8 votes
2 answers
6k views

How can I connect to Postgres running on the Windows host from inside WSL2?

I have Postgres running on my windows machine and I need to connect to it from inside WSL2. The postgres windows service is running I can connect to it from the windows command line using psql The IP ...
user avatar
0 votes
2 answers
600 views

Unable to delete .gitconfig folder in user home wsl2

I want delete the .gitconfig folder in my user's home directory on Ubuntu 20-.04 (WSL2) but I'm getting this strange error: rm: cannot remove '.gitconfig/': Device or resource busy I've tried testing ...
user avatar
0 votes
1 answer
81 views

My Magento only can load the first front page, and all the page are 404. Nginx server configuration issue

I am trying to run Magento 2 on WSL, ubuntu Nginx webserver, localhost I only able to load my website first front page, but the rest of the pages are 404 not found. I only modify the /etc/nginx/sites-...
user avatar
  • 103
3 votes
2 answers
1k views

L0 KVM and Win10 L1 nested virtualization not working (Windows boot loop)

I'm having a hard time getting nested virtualization inside my Win10 Pro guest running on KVM host working. Enabling Windows Hypervisor hypervisorlaunchtype auto results in a boot loop/boot to ...
user avatar
3 votes
0 answers
779 views

Connecting MongoDB Compass to WSL2 Mongo server [closed]

I am running a mongoDB server on Ubuntu via Windows Subsystem for Linux 2. (Windows build is 19041.) I have MongoDB Compass running on Windows, and it is happy to connect to my Mongo server in Windows,...
user avatar
2 votes
0 answers
757 views

WSL2 on Windows 10 - installed NVM, Node but can't install any package

I have WSL 2 on my Windows 10 (* Ubuntu-20.04 Running 2). I installed nvm and node on it. nvm --version: 0.35.3 nvm ls: -> v14.11.0 default -> node (-> v14.11.0) node -> stable (->...
user avatar
  • 121
3 votes
1 answer
3k views

How to use Windows Kerberos ticket in WSL and/or Docker

I don't know much about Kerberos authentication, I just have some basic experience with configuration and usage. Recently I noticed that Windows has a built-in Kerberos implementation that is ...
user avatar
  • 131
2 votes
4 answers
7k views

When will WSL2 to be generally available on Windows Server?

Searching the internet shows that with Windows 10 version 2004, WSL2 (Windows Subsystem for Linux, v2) is now generally available. I use it, and it's great. All of the information (as at September ...
user avatar
0 votes
1 answer
487 views

Routing ipv4 traffic to ipv6 on windows 10

I'm running some services on WSL2 which only seems to support listening on ipv6 interface on the host side. This means everything outside WSL trying to connect to a WSL2 service on 127.0.0.1 is ...
user avatar
  • 101
0 votes
1 answer
218 views

"Connection was reset" accesing apache2 virtualhost through wsl1 and /etc/hosts

I am new with linux but am trying to install koha (a library management system) through Debian 10 on my laptop using windows 10 ver.1903 (build 18362.900) and wsl1 as a test for installing it in my ...
user avatar
0 votes
1 answer
618 views

the same ssh rsa key does not work in Ubuntu(WSL) while from RHEL7 it works

I'm trying connect from Ubuntu(WLS) to RHEL7 server using ssh RSA key. And it does not work, while the same key when used from another RHEL7 host works. I checked all file permissions There is no &...
user avatar
  • 285
0 votes
0 answers
2k views

AnyDesk TCP tunnelling port "closed" since Windows 10 2004

I connect to my company computer via AnyDesk. I have set up a TCP tunnel from local port 11111 to remote port 22, to have an SSH connection to the remote machine. This stopped working since I ...
user avatar
  • 214
0 votes
1 answer
2k views

Local domain name resolution with WSL & Docker

I'm developing an app that is a combination of a Chrome extension and Rails backend (plus redis, solr and postgres). I've recently switched to developing on my nice home Windows rig instead of my ...
user avatar