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
18 votes
1 answer
16k 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 ...
René Link's user avatar
8 votes
4 answers
17k 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 ...
Dax Fohl's user avatar
  • 283
8 votes
2 answers
10k 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 ...
Botond Balázs's user avatar
5 votes
1 answer
11k 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 ...
yossi's user avatar
  • 169
4 votes
1 answer
6k 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....
Ken Tsoi's user avatar
  • 143
3 votes
4 answers
28k 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 ...
justadev's user avatar
  • 413
3 votes
5 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 ...
Orion Edwards's user avatar
3 votes
2 answers
25k 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 ...
casparjespersen's user avatar
3 votes
3 answers
14k views

rsync server using Windows Subsystem for Linux

Is it possible using the Windows 10 Windows Subsystem for Linux (WSL) to have a rsync server running on a Windows box? We have a linux rsync system that polls Windows boxes currently running ...
Torfey's user avatar
  • 33
3 votes
2 answers
2k 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 ...
grasbueschel's user avatar
3 votes
1 answer
1k views

How do I deal with paths when creating a PowerShell alias for a Windows Subsystem for Linux command?

I am updating my PowerShell aliases to include utilities from the Windows Subsystem for Linux. For example, I want to launch vim from PowerShell. Set-Alias -name 'vim' -Value 'Start-Vim' function ...
Erick T's user avatar
  • 191
3 votes
1 answer
5k views

Pages load only when you restart php-fpm

So here's more context in a GIF Notice how pages do not load on link clicks, but as soon as you run service php7.2-fpm restart it instantly loads the page and like that with every page. What is ...
user3108268's user avatar
3 votes
1 answer
618 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 {...
Evian's user avatar
  • 131
3 votes
0 answers
2k 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 ...
timot.cool's user avatar
3 votes
0 answers
944 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,...
David Kennell's user avatar
3 votes
1 answer
6k 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 ...
SchLx's user avatar
  • 139
2 votes
1 answer
467 views

Does Bash through Linux as a Subsystem for Win10 replace Git Bash for Windows?

I'm in the process of learning how to create Wordpress templates, and as a part of that was told to install Git, npm, node and gulp. However, the online course leaves out details about where stuff ...
Carol478's user avatar
2 votes
1 answer
162 views

Set stack limit on WSL2 permanently

How can I permanently change the stack size in WSL2 Ubuntu? I can temporarily change the size with: ulimit -s unlimited But that only lasts till the session is closed. I have tried adding these lines ...
nograpes's user avatar
2 votes
1 answer
561 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 ...
user622130's user avatar
2 votes
0 answers
494 views

Access of K8s service within WSL2 + Docker Desktop from Linux machine over HTTPS

I've setup an authentication service in a Kubernetes cluster which lives in a Docker Desktop + WSL2 environment on a Windows 11 Pro machine. It can be reached e.g. via CURL & PostMan requests from ...
ShadowGames's user avatar
2 votes
0 answers
2k 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: - '...
netdjw's user avatar
  • 121
2 votes
0 answers
2k 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 ...
pico's user avatar
  • 121
2 votes
0 answers
1k 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 (->...
AlexB's user avatar
  • 121
2 votes
2 answers
3k views

How to get Ubuntu in WSL 2 to talk to an HTTP server on same Windows host?

I am running a console app in Windows 10 which has a self-hosted HTTPS server listening on port 44340. It's an ASP.NET Core website (Kestrel) and its perfectly browsable on the Windows side. I cannot ...
Luke Puplett's user avatar
2 votes
0 answers
2k views

WSL issue: cannot execute C:\Windows\System32\Bash.exe from elevated PowerShell - “access is denied” - works in normal CMD/PS prompt (no admin rights)

I have an issue with WSL (Windows Subsystem for Linux) in PowerShell. If I run the Ubuntu 18.04 LTS app (the UWP app) it works as expected. However, if I run and run Bash.exe from an elevated ...
SamAndrew81's user avatar
1 vote
1 answer
4k 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 ...
Narfanator's user avatar
1 vote
1 answer
4k views

Getting CUPS and printing working on Ubuntu with Windows Subsystem for Linux [closed]

I'm building a cross platform printing app and need to test it on various Linux. I could use VMs but I've got WSL just sitting here working and it will be a lot more convenient, at least initially ...
tig's user avatar
  • 113
1 vote
1 answer
928 views

How to have WSL think it is in the past? [closed]

I am developing PHP/Apache/MySQL based code on my Windows 10 laptop via Windows Subsytem For Linux. I am working on some code that is time related. It has a mix of PHP date commands, and MySQL "NOW()"...
Hippyjim's user avatar
  • 211
1 vote
1 answer
449 views

WSL2 stopped running windows tools seemingly all of a sudden - cannot execute binary file: Exec format error

I have been using WSL2 for almost a year now and was always able to run windows tools from it without any problems. Today I have noticed I am unable to do it anymore: mark@L-R910LPKW:~$ alias npp ...
mark's user avatar
  • 745
1 vote
1 answer
210 views

Ping with jumbo frames fail but returns default ping fail message

I need to set up a local connection between my Windows 11 PC and an external device (IP 10.0.0.10), with jumbo frames enabled (MTU 9000). The end goal on my PC is to connect to the remote device from ...
C. Crt's user avatar
  • 111
1 vote
1 answer
1k views

Is it possible to make a L2TP/IPsec VPN connection from within a linux-based Docker for Windows (WSL) container?

I use Windows. My main goal is to be able to open corporate websites which are only available via corporate VPN such as GitLab. Since Windows wouldn't allow me to specify which websites I would like ...
AgentFire's user avatar
1 vote
1 answer
1k views

How to run two different applications simultaneously in same port with same Machine in Ubuntu

I want to run two different applications (i.e:Two different Microservices) running in same port(eg:in port 3000).I have implemented concepts like creating multiple distro's in ubuntu.But ...
CodeBox's user avatar
  • 11
1 vote
1 answer
1k 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 ...
Gautam's user avatar
  • 111
1 vote
1 answer
2k 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 (...
eagarc's user avatar
  • 11
1 vote
1 answer
142 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:\<...
Dominique's user avatar
  • 123
1 vote
2 answers
3k 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 ...
이형욱's user avatar
1 vote
1 answer
1k views

any way to integrate authentication with subsystem for linux?

Looking at windows docs and trying to script this: Invoke-WebRequest -Uri https://aka.ms/wsl-debian-gnulinux -OutFile distro.zip -UseBasicParsing Expand-Archive distro.zip debian cd distro .\debian....
red888's user avatar
  • 4,233
1 vote
0 answers
85 views

Running wsl received "An error occurred in the secure channel support"

What is the reason behind this error when running wsl --install PS C:\Users\dev> wsl --install An error occurred in the secure channel support
angelokh's user avatar
  • 111
1 vote
1 answer
723 views

How to forward WSL2 8080 to Windows host's 8080?

I have: a Spring Boot application running on Windows on 8080 and a service running in the Docker container within the WSL2 Ubuntu, and I'm loking how to enable the Windows host's 8080 to this ...
imy's user avatar
  • 111
1 vote
0 answers
479 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 ...
Jason Thompson's user avatar
1 vote
0 answers
305 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@...
Reuben deVries's user avatar
1 vote
1 answer
686 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 ...
khoshahmad's user avatar
1 vote
2 answers
2k 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 ...
Xavi Montero's user avatar
1 vote
0 answers
3k 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 ...
Bob's user avatar
  • 13
1 vote
0 answers
283 views

Error installing OpenLDAP in WSL2

I'm trying to set up OpenLDAP to act as a non-secure proxy to Secure LDAP to support a legacy app so we can finish our migration to Azure Active Directory. I'm trying to install OpenLDAP on my system ...
The Sharp Ninja's user avatar
1 vote
0 answers
907 views

Problems with `PUT` FTP command under WSL2 (via VPN)

I'm experiencing problems with FTP under WSL2 while trying to transfer a HTML file to an FTP server running under IIS 10. After issuing a PUT command it gets stuck on "Waiting for transfer to ...
knee-cola's user avatar
  • 231
1 vote
1 answer
5k views

PyCharm on Windows 10, how to use WSL ubuntu bash to run shell scripts?

I have installed PyCharm Community Edition on Windows 10, my Windows also has WSL Ubuntu installed. We know that PyCharm on Linux can create and run shell scripts because PyCharm use the /bin/bash on ...
Gary Allen's user avatar
0 votes
2 answers
4k views

How to run in background a Linux command in Windows WSL (Ubuntu1804)

In the effort to bring some of the Linux advantages to my customers running Windows 10, I've developed a few bash scripts in order to automate some of their everyday tasks. I use to let them run the ...
Marco's user avatar
  • 1,709
0 votes
2 answers
3k views

How to install Linux distro on Windows Server 2019 and WSL version 1

I am trying to use WSL on a server with Windows Server 2019 (Version 1809). I enabled the WSL feature and can execute the wsl command in powershell. PS C:\Users\user> wsl Windows Subsystem for ...
esel's user avatar
  • 129
0 votes
1 answer
216 views

Running out of open files with sshd

I have a Java application running in WSL2 I also have an ssh connection (in Windows) to a app server, and tunnel ports from the app server for a web server hosted on a second app server back to my ...
The Archetypal Paul's user avatar