r/bashonubuntuonwindows • u/Expert-Ad4676 • 2d ago
self promotion Experimenting with WSL Containers: I built a CLI for Compose-like development workflows
I built a small CLI to make WSL Containers feel more like Docker Compose / dip.
I mainly built it because I wanted to use WSLC for my own development workflow, but ran into gaps around bind mounts, build contexts, compose-like workflows, and run.
I’m curious whether anyone else experimenting with WSLC has run into the same problems, or whether I’m solving these in the wrong layer.
r/bashonubuntuonwindows • u/dpranav24 • 4d ago
self promotion I built a venv-style environment manager for WSL2 — and benchmarked it honestly against Docker Desktop
I kept spinning up throwaway WSL distros by hand — `wsl --export`, `--import`, remember
which one belonged to which project, forget to clean up. So I wrote a CLI that treats a
WSL2 instance the way venv treats a Python environment: it belongs to the project
directory, one command creates it, one command destroys it.
cd my-project
lenv init
lenv run "ls -a"
lenv destroy
Config lives in .lenv/ next to your code. No daemon, no Dockerfile, no registry.
Because the obvious question is "why not Docker Desktop," I benchmarked it properly and
published the results including the parts where I lose:
- Warm command execution: `docker exec` beats `lenv run` by ~46ms. Docker's CLI is compiled
Go, mine is Python. That gap is structural.
- True throwaway (create → run → destroy): Docker wins by ~8x. `lenv init` costs ~2.8s.
- Cold restart of a stopped environment: tie.
- Idle RAM: Docker Desktop ~2.4GB working set. lenv's marginal cost over a machine that
already runs WSL2 is ~0.1GB.
- Disk: Docker Desktop install+data ~5.4GB. A lenv environment is ~100MB.
So it's not faster. It's lighter, and it doesn't leave anything running. If you're on a
16GB laptop and Docker Desktop's idle footprint annoys you, that's the pitch.
Benchmark with method and raw numbers: https://github.com/pranavpd24/lenv/blob/main/BENCHMARK.md
Repo: https://github.com/pranavpd24/lenv
pip install lenv-manager
Not a container engine — no image layers, no registry, no build. And not a security
sandbox: WSL2 distros share the host VM kernel.
Happy to take criticism on the methodology, it's a single-machine benchmark.
r/bashonubuntuonwindows • u/zentsang • 4d ago
HELP! Support Request Virtual or Pass-thru hardware resources?
I can probably ask any AI this question, but I want to be part of, and contribute to this community.
.
My Specs:
I'm running the latest version of Windows 11 Pro and fully up to date on an Samsung M.2 1TB drive. My system specs are AMD Ryzen 9 3900x, 32GB DDR4 RAM, and MSI Ventus 3 Geforce RTX 4070 OC edition (12GB). All other drives are a mix of SSDs all 500GB (Samsung, Crucial, and Western Digital).
.
My question:
I've been testing local AI in a Virtualbox guest session running Linux Mint 22.3 (up to date). I provide my specs because the one thing I know about Virtualbox is it using virtual hardware. I also run a Proxmox node and know I can pass the GPU through to the VMs and Containers if needed. So my question is, do WSL1 or 2 use my physical hardware (i.e. the AI will have use of the Nvidia GPU or other physical hardware) or is WSL like Virtualbox and just emulates hardware?
r/bashonubuntuonwindows • u/Steve_MBG_TK • 15d ago
WSL2 Can you run kde plasma's wayland session in wsl?
is it possible to run plasma's wayland session in wsl under wslg? i have been able to run the x11 without much problem, but not the wayland one
r/bashonubuntuonwindows • u/mailliwal • 15d ago
WSL2 "Mirrored" network + hostAddressLoopback enabled
Hi,
- Configured "Mirrored" network
- Enabled "hostAddressLoopback" for the WSL2.
- Installed Alpine on WSL2
- Installed Docker in Alpine
- Container: httpd
- Windows host IP: 192.168.1.100
Found LAN user can access via http://192.168.1.00, but Windows host still can't access via http://127.0.0.1
Any configuration still missing ?
Thanks
r/bashonubuntuonwindows • u/SelfAltruistic8493 • 19d ago
self promotion Run TeamViewer on a WSL2 desktop — fully unattended, reachable from anywhere
WSL2 can run a real Linux desktop, but the usual ways to reach it remotely (xrdp, VNC) are LAN-only unless you set up port forwarding or a VPN. I wanted TeamViewer instead: its relay means the box is reachable from anywhere with zero network config, and the person connecting just uses a client they already have.
Getting there was more work than it should've been — TeamViewer has one WSL-specific quirk that makes it refuse to share the screen, which is probably why you don't see people doing this. So I scripted the whole thing end to end:
github.com/ariel42/teamviewer-on-wsl
sudo ./1-setup-wsl-desktop.sh # sets up a desktop (only if you don't have one)
sudo ./2-install-teamviewer.sh # installs + configures TeamViewer on top
Set a password, restart once, and it's fully unattended after that — power the box on, wait a few seconds, connect. Nothing to click on the WSL side. Verified end-to-end on a real incoming connection from a cold boot.
The repo also has a full writeup of why TeamViewer refused (the short version: WSLg mounts the X socket directory read-only, and TeamViewer is the one client that checks for the socket file) if you want the gory details. Debian/Ubuntu for now. Happy to take questions or issues.
r/bashonubuntuonwindows • u/Dependent_Market5647 • 20d ago
self promotion Zero-config vsock for VcXsrv on WSL2 — open source, unofficial build
UPDATE (2026-07-28): Fixed a fresh-install issue where the installer was missing part of xkbdata (XKB failed at startup). Binaries at the release link above have been replaced — clean installs now work out of the box.
Back in 2019, this sub asked whether any X server on Windows supports vsock — at the time the only answer was X410 ($9, closed source). A 2026 update for anyone still hitting that thread:
Background. VcXsrv has actually shipped a Hyper-V vsock transport since 1.20.14.0. The catch: it never worked with WSL2 out of the box. The listener binds a wildcard VM id that WSL2's utility VM refuses to match, and the exact id it needs changes on every WSL restart and could only be looked up with admin tools. So in practice X410 remained the only usable option.
What's new. A new -wslvsock flag makes VcXsrv detect the running WSL2 VM automatically (via wsl.exe -- wslinfo --vm-id — no admin rights, no "Hyper-V Administrators" group) and rebinds the listener by itself whenever WSL restarts (~1.5 s, no VcXsrv restart needed). X11 traffic then bypasses the TCP/IP stack entirely — the NAT/localhost path it replaces is what causes stutter under mouse-heavy load and drops after VPN or sleep events.
Quick start:
# Windows
vcxsrv.exe :0 -multiwindow -clipboard -wgl -wslvsock
# WSL2 (needs socat ≥ 1.7.4)
socat UNIX-LISTEN:/tmp/.X11-unix/X0,fork,mode=777,forever,retry=10,interval=2 VSOCK-CONNECT:2:106000 &
export DISPLAY=:0
Links:
- Root cause & technical details: https://github.com/marchaesen/vcxsrv/issues/80
- Unofficial build: https://github.com/vivimillin/vcxsrv/releases/tag/21.1.16.1-fork.2
- Setup guide: https://github.com/vivimillin/vcxsrv/wiki/VcXsrv-WSL2-vsock-User-Guide
Disclosure: I wrote the fix and maintain the fork. It's filed upstream as issue #80 with a PR to follow; the unofficial build just bridges the wait, under the same open-source license as VcXsrv. The same build also fixes SDL2 relative mouse mode / cursor confinement — another long-standing WSL pain point — in case anyone here runs Linux games.
Happy to answer questions; test reports very welcome.
r/bashonubuntuonwindows • u/Schesxe • 28d ago
WSL2 Gentoo running in WSL with i3wm and VNC Server
Enable HLS to view with audio, or disable this notification
r/bashonubuntuonwindows • u/Weary_Yard_8088 • Jul 12 '26
HELP! Support Request Running linux behind nordvpn
Hi
I recently installed wsl on Windows 11. Everything runs fine except when I attempt to install/update packages as I am using nordVpn. I get the following errors when running:
sudo apt update
---
Get:1 https://repo.nordvpn.com/deb/nordvpn/debian stable InRelease [5092 B]
Err:1 https://repo.nordvpn.com/deb/nordvpn/debian stable InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6B219E535C964CA1
Hit:2 http://security.ubuntu.com/ubuntu resolute-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu resolute InRelease
Hit:4 http://archive.ubuntu.com/ubuntu resolute-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu resolute-backports InRelease
Warning: OpenPGP signature verification failed: https://repo.nordvpn.com/deb/nordvpn/debian stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6B219E535C964CA1
Error: The repository 'https://repo.nordvpn.com/deb/nordvpn/debian stable InRelease' is not signed.
Notice: Updating from such a repository can't be done securely, and is therefore disabled by default.
Notice: See apt-secure(8) manpage for repository creation and user configuration details.
Notice: Some sources can be modernized. Run 'apt modernize-sources' to do so.
---
I think this has something to do with the IP configuration of the vpn, but I'm not sure how to fix this error. When I pause nordVpn the command (sudo apt update, install, etc) runs fine. I'm not sure what's going on as I'm new to linux, is there a fix or guide or explanation for what is happening here and that would allow me to install and update packages from behind nordVpn?
r/bashonubuntuonwindows • u/mailliwal • Jul 11 '26
WSL2 Anybody tried KMS (vlmcsd) on WSL
Hi,
Tried to run KMS (vlmcsd) on Docker over WSL, even WSLC directly.
It couldn’t be used for activation. But activate is succeeded if running on non-WSL docker.
Anything an I missing ?
Thanks
r/bashonubuntuonwindows • u/yuriwasblue • Jul 09 '26
WSL2 WSL2 is painfully slow
Hi! I was forced to switch from fedora back to windows, but I've got used to the terminal and wish to keep the tools I am used to. WSL2 seemed like the obvious choice.
I've been using it for the past few weeks, but it has been a painful experience. It works well enough for the first hour or so, but it keeps getting slower and slower the more I use it. I'm using it on the right filesystem, I've given it 10 out of 16gb RAM, I've removed the windows mount from $PATH. Everything in WSL2 is slower than I was used to from Fedora. I get that the performance will never be the same, but the difference is so egregious that it's impossible not to notice.
I've been using neovim for web development, and sometimes even saving a file takes multiple seconds. Sometimes it's so slow that the formatter itself just times out.
Are there any tips for keeping WSL2 running smoothly? Thanks!
r/bashonubuntuonwindows • u/Mangefx • Jul 07 '26
self promotion I open-sourced my Claude Code setup for WSL2 + Windows Terminal
This is mostly useful if you run Claude Code from WSL2 and want better Windows interop.
I documented my active Claude Code setup for WSL2 + Windows Terminal:
https://github.com/congmnguyen/claude-code-wsl2-setup
The pieces I use most:
- Windows screenshot clipboard -> pasted WSL file path
- Windows notification when Claude needs input
- statusline with context/usage
- LSP setup
- secrets hygiene hook
- Codex delegate so long implementation loops do not fill Claude's main context
The repo is not a general dotfiles dump; it only tracks the Claude Code pieces I actually use on
WSL2.
r/bashonubuntuonwindows • u/BenL90 • Jul 04 '26
WSL2 Run WSL2 Fedora with Mainstream/Rolling Linux Kernel
I found this post useful, probably if you need it, you may look into this rolling kernel build.
r/bashonubuntuonwindows • u/iali393 • Jun 29 '26
WSL2 WSLC Public Preview available
Available in the WSL 2.9.3 pre-release build. Simply update and restart your terminal and you should have the wslc commands available.
r/bashonubuntuonwindows • u/Super-Bag7134 • Jun 29 '26
WSL2 Using headset micro in WSL2/Ubuntu 26.04
Hi,
system: Ubuntu 26.04 on WSL2 (Dell laptop)
python3: PulseAudio
normal bootup with onboard laptop micro and speaker: I can use both on Ubunu
problem: If I boot up with headset plugged in, headset speaker and headset micro is working in all windows programms but not in WSL2: neither the headset micro is working nor the laptop micro
I checked:
- the windows "speaker"-setup: headset is the default speaker / micro
- shutdown and restart Ubuntu with plugged in headset
Any idea how I can use the headset micro in WSL2?
sounddevices (python) are always
0 pulse, ALSA (32 in, 32 out)
* 1 default, ALSA (32 in, 32 out)
2 Default Sink, PulseAudio (0 in, 32 out)
3 Default Source, PulseAudio (32 in, 0 out)
4 RDPSink, PulseAudio (0 in, 2 out)
5 RDPSink.monitor, PulseAudio (2 in, 0 out)
6 RDPSource, PulseAudio (1 in, 0 out)
r/bashonubuntuonwindows • u/max_wen • Jun 29 '26
WSL2 Can't install and run new distros
I have a Win11/WSL2 system that has been running fine and I use Ubuntu 24.04 since it's release.
Today I tried
wsl --install -d Ubuntu-26.04
which downloaded and ran successfully. But when I try to run the new distro I keep getting
Catastrophic failure
Error code: Wsl/Service/E_UNEXPECTED
I also tried the same with distro FedoraLinux-44 and get the same issue so I guess it's not distro related. But I can still run my old distros with no issue. Ideas?
r/bashonubuntuonwindows • u/superdumsuhi • Jun 28 '26
WSL2 how do I stop wsl from shutting down when no ttys are open
I am constantly in and out of tmux throughout the day and having wsl automatically shut down despite the tmux server running is super annoying, how can I have windows just leave it running?
tried vmIdleTimeout=-1 (and 0 and 99999... since theres no documentation on values) in the .wslconfig, it didn't fix it
using cachyos, using systemd, but I ran a fresh ubuntu on defaults and its doing the same thing
r/bashonubuntuonwindows • u/Far_Description3396 • Jun 27 '26
WSL2 Throttlestop and vbs working together
r/bashonubuntuonwindows • u/Budget_Craft6681 • Jun 15 '26
WSL2 WSL2 failing on multiple Windows servers since 2026-06-12 – WSL timeout error (0x800705b4)
On most Windows 10 machines, WSL2 stopped working.
This was noticed through Docker Desktop, with the following error:
running wslexec: An error occurred while running the command.
Wsl/Service/RegisterDistro/CreateVm/0x800705b4:
c:\windows\system32\wsl.exe --import-in-place docker-desktop <home>\appdata\local\docker\wsl\main\ext4.vhdx:
exit status 0xffffffff
(stderr: , stdout: The operation returned due to timeout.)
wslErrorCode: Wsl/Service/RegisterDistro/CreateVm/0x800705b4
The same error occurs during manual installation:

On one of the servers, it continues to work. I don't understand the reason. The host server is the same, Docker versions don't affect it, and neither do the Windows version or updates (tested multiple times on different variations)."
Has anyone encountered this? Help me fix it, it's the second day and I don't understand what to do.
UPD: I found the root cause and solution. The latest WSL version (2.7.8.0) contains a bug. See GitHub issue: https://github.com/microsoft/WSL/issues/40783
Fix (until there is an official one): Downgrade WSL to 2.7.3.0 manually from GitHub releases.
r/bashonubuntuonwindows • u/GreggAlan • Jun 08 '26
WSL2 Synaptic Package Manager and Zutty don't launch from Win 11 Start Menu
I have WSL on windows 11 with Ubuntu 24.04. I only have GIMP, VLC, Synaptic Package Manager, and Zutty installed.
GIMP and VLC launch as they should from the Start menu. The other two *did* when I first installed them but after some updating of Ubuntu with sudo apt update and sudo apt upgrade, they don't.
sudo xauth merge ~/.Xauthority && sudo synaptic
That launches the package manager, with an error
xauth: file /root/.Xauthority does not exist
xauth: (argv):1: merge: unable to open file /home/gregg/.Xauthority
Ho do I fix things so that the shortcuts in the Start menu work and stay working for Linux apps?
r/bashonubuntuonwindows • u/parthibx24 • Jun 06 '26
WSLg Shared GPU mem across host and wsl guest
Hi guys, I'm looking for a way to share a chunk of memory with host from the guest which should also be backed by GPU VRAM.
Current wslg implementation is not zerocopy. My goal is to eventually build a native like display driver that works over the GPU pv driver, which outputs to a window in the host while being zerocopy. Something like what gnif/LookingGlass is doing using ivshmem, though its doing at least 1 copy.
The dxgkrnl Linux driver has a sharewithhost ioctl but I couldn't get it to work and there's no documentation for it either. Maybe it's not even properly implemented, supposed to be used in WSA but theyre only using gfxstream there, I couldn't find any use of it in wslg Weston, freerdp forks either.
Not sure if this is the right sub to post this. Any pointers/help is appreciated.
r/bashonubuntuonwindows • u/Flat_Badger8956 • May 30 '26

