r/bashonubuntuonwindows • • May 19 '25

WSL2 WSL is open sourced!

Thumbnail github.com
294 Upvotes

r/bashonubuntuonwindows • • May 25 '25

How is everyone doing with WSL FY25?

38 Upvotes

It's been quite a while since WSL is hitting mainstream. Less people need help getting it up and running, and I'm curious how eveyrone is doing here. What issues are you running into? What are you using it for. Let's have a check in.


r/bashonubuntuonwindows • • 11h ago

self promotion I got tired of ext4.vhdx eating my C: drive, so I wrote one tool for clean + backup + compact

23 Upvotes

Deleting files inside WSL doesn't give the space back to Windows. I moved about 20 GB of project data out of my distro to another drive, and ext4.vhdx stayed at 66.7 GB. C: was down to 21 GB free, while the distro itself now held about 33 GB.

The fix is known (clean up, wsl --shutdown, Optimize-VHD), but I was doing it with 8 different scripts and kept forgetting a step. So I merged them into one tool:

  • maint audit / maint space - what is taking the space, per cache rule and per folder, plus how much a compact would return. Deletes nothing.
  • maint clean - cleans caches from a rules file (npx, pip, the journal, Playwright browsers no project pins any more, and so on), with --dry-run
  • maint docker - prunes the build cache and anonymous dangling volumes. Named volumes only if you opt in, and db-data/mysql/postgres-like names are never touched
  • maint.bat full - clean, export the distro to a zstd archive, verify it, rotate old backups, shut WSL down, compact both ext4.vhdx and docker_data.vhdx

Result on that run (clean, then winclean for %TEMP% and the recycle bin, then compact): ext4.vhdx 66.7 -> 42.8 GB, docker_data.vhdx 33.3 -> 31.0 GB, about 3.8 GB from TEMP and the bin, C: free 21 -> 56 GB.

Things to know before you run it:

  • full and compact shut WSL down and need admin (UAC prompt)
  • compact needs the Hyper-V PowerShell module, so on Windows Home only the cleanup and backup parts work
  • the shipped rules.conf is from my machine, review it first. audit and --dry-run are safe to try

Bash on the WSL side, PowerShell 5.1 on the Windows side, one shared config. MIT.

https://github.com/tegos/wsl-maint

There's a demo gif in the README. Feedback welcome, especially from people on Windows Home or with the distro on a non-C: drive.


r/bashonubuntuonwindows • • 8h ago

HELP! Support Request The 5 errors I hit installing a Linux-only AI tool on Windows (WSL), and the fix for each

0 Upvotes

I’m not a developer. I tried to install an AI CLI (Composio) on Windows and the installer said “Windows is not supported. Use WSL.” Then I hit error after error. Here’s every fix, so you don’t lose an afternoon like I did:

1. 0x80370102 when installing WSL
Turn on virtualization in BIOS (Intel VT-x / AMD SVM), tick Virtual Machine Platform and Windows Subsystem for Linux in Windows Features, restart, then wsl --update.

2. unzip is required
sudo apt update && sudo apt install -y unzip

3. Could not resolve host (Ubuntu has no DNS)
printf '\n[network]\ngenerateResolvConf = false\n' | sudo tee -a /etc/wsl.conf
then wsl --shutdown in PowerShell, reopen Ubuntu, and:
sudo rm -f /etc/resolv.conf && echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf
(On a VPN? Try networkingMode=mirrored + dnsTunneling=true in .wslconfig instead.)

4. command not found right after installing
source ~/.bashrc or close and reopen Ubuntu.

5. Duplicated config key warning
Harmless. Remove the extra lines with sudo nano /etc/wsl.conf.

I made a 4-minute video showing all of it step by step: https://youtu.be/CtT1BxWFLFM

What other errors have you hit with WSL? I’m collecting them.


r/bashonubuntuonwindows • • 3d ago

self promotion Run GPU accelerated Desktop on WSL

121 Upvotes

Weaselway provides a way to run a fully GPU accelerated Wayland compositor in WSL2. This means KDE, Gnome, Hyprland and all the other ones.

https://github.com/weaselway/weaselway#weaselway

By hacking mesa and having a kernel module that implements the necessary parts of drm and kms, we can get the compositor to belive that a monitor exists and we can get the application to transfer their rendered gpu surfaces directly to the compositor. The updated regions from the monitor are then read back to cpu memory and transfered to a patched freerdp client via shared memory. Similar to how WSLg does it.

You can download and try a NixOS based GNOME and KDE image directly from the github releases.

Before someone screams slop: it works perfectly fine, I now know more than before I started the project and it might even reduce the entry hurdle for people to try out a Linux Desktop.


r/bashonubuntuonwindows • • 2d ago

self promotion Ming64x - X Window Display Server for Windows

Post image
10 Upvotes

I am pleased to announce a free X Window Server in the Microsoft Store.
See https://apps.microsoft.com/detail/9N4VVR1BD0Z5
This works great with WSL, especially in single-window mode.
Ming64x uses Overlapped-IO, so it's lightning-fast!!
Also has a built-in ssh terminal and X11/forwarding.


r/bashonubuntuonwindows • • 4d ago

HELP! Support Request WSL3 disk r/w is 1250MB/s?

12 Upvotes

Yesterday I updated from WSL2 to WSL3 using `wsl --update`, first I noticed that it uses so much RAM about 7GB while the usage inside Ubuntu is 3GB-ish, then I limit the RAM to 4GB in WSL Settings and now the disk read/write is at 1200MB/s.

I don't know what is going on, I'm just doing my regular workflow like when I was using WSL2, there's nothing suspicious on what I run inside Ubuntu. Never had this problem before.


r/bashonubuntuonwindows • • 12d ago

WSL2 Why the resistance?

12 Upvotes

I'm learning WSL2 and I'd like to understand why many developers criticize the idea of using Windows solely as a lean host, keeping only what's necessary installed on it, while using WSL2 with the VS Code WSL Remote extension (installed on the host) to run tools such as .NET, Git, Podman, etc., without having to install them directly on Windows.

Recently, I made a post about .NET and received a lot of negative responses, mainly arguing that this approach adds “unnecessary extra overhead.”


r/bashonubuntuonwindows • • 16d ago

HELP! Support Request Hey everyone! I am new linux user, using WSL!! Can anyone please guide me for a perfect starting??

Thumbnail
1 Upvotes

r/bashonubuntuonwindows • • 19d ago

Apps/Prog (Linux or Windows) WSL containers is now generally available

43 Upvotes

r/bashonubuntuonwindows • • 20d ago

self promotion Running AlmaLinux 10 on WSL 2 as a full PHP dev environment — setup in three commands

13 Upvotes

Most WSL guides assume Ubuntu. We needed a RHEL-compatible distro because that's what our servers run, so we built our dev environment on AlmaLinux 10 under WSL 2. (Disclosure: I'm on the team that maintains it.)

The setup:

  1. Check WSL 2 is enabled: `wsl -v`

  2. Install the distro: `wsl --install -d AlmaLinux-10`

  3. Inside AlmaLinux, clone the repo, fill in `config.yml`, and run:

    `ansible-playbook -i hosts install.yml --ask-become-pass`

That gives you Apache, PHP (switchable 8.1–8.5), MariaDB, phpMyAdmin, Node.js (switchable 18–24) and Composer. Every `*.localhost` domain routes to its own virtualhost without editing the Windows hosts file.

WSL-specific notes, like the Windows features you need and the WSL configuration, are in the docs: https://docs.dotkernel.org/development/

Overview page: https://www.dotkernel.com/wsl2/

Happy to answer questions about running a dnf/systemd distro under WSL. There were a few gotchas.


r/bashonubuntuonwindows • • 28d ago

WSL2 Fix for WSL mirrored networking error CreateInstance/CreateVm/ConfigureNetworking/0x8007054f

24 Upvotes

TL;DR

Check your Windows TCP dynamic port range in Administrator PowerShell:

netsh int ipv4 show dynamicport tcp
netsh int ipv6 show dynamicport tcp

If the range has been changed to something huge like:

Start Port      : 1024
Number of Ports : 64511

restore the normal Windows dynamic port range:

netsh interface ipv4 set dynamicportrange protocol=tcp startport=49152 numberofports=16384
netsh interface ipv6 set dynamicportrange protocol=tcp startport=49152 numberofports=16384

Then reboot Windows.

This completely fixed the WSL mirrored networking 0x8007054f error for me.

Posting this because I spent a ridiculous amount of time restarting WSL/HNS, changing WSL versions, and chasing Hyper-V issues. In my case, the actual problem was the Windows dynamic TCP port range.

Falling back to normal WSL networking also wasn't a good workaround for me because I need reliable Windows ↔ WSL communication for MCP servers.

I was repeatedly getting this error:

wsl: An internal error occurred.
Error code: CreateInstance/CreateVm/ConfigureNetworking/0x8007054f
wsl: Failed to configure network (networkingMode Mirrored), falling back to networkingMode None.

My .wslconfig was:

[wsl2]
networkingMode=mirrored
dnsTunneling=true

WSL itself would still start, but mirrored networking would fail and fall back to:

networkingMode=None

For my setup, switching away from mirrored networking wasn't really an acceptable workaround.

I run MCP servers/services inside WSL that need to communicate with applications running on Windows, and vice versa. Some of them don't work properly or aren't reachable the same way when WSL is using the default NAT-style networking.

With mirrored mode, Windows ↔ WSL localhost/network communication works much more cleanly for these services, so I specifically needed to get:

networkingMode=mirrored

working again.

Things I tried that didn't reliably fix it

  • wsl --shutdown
  • restarting WSL multiple times
  • restarting hns
  • restarting vmcompute
  • upgrading WSL
  • downgrading WSL
  • trying pre-release WSL versions
  • checking that VirtualMachinePlatform was enabled
  • checking that Microsoft-Windows-Subsystem-Linux was enabled
  • checking that HypervisorPlatform was enabled

Sometimes restarting WSL a few times would randomly make mirrored networking work again, but the problem would eventually return.

The actual problem

I eventually found this WSL GitHub issue/comment:

https://github.com/microsoft/WSL/issues/41251#issuecomment-5188667183

It pointed to the Windows TCP dynamic port range.

I checked mine in Administrator PowerShell:

netsh int ipv4 show dynamicport tcp
netsh int ipv6 show dynamicport tcp

My TCP dynamic port range had been changed to essentially the entire port space.

It looked like this:

Start Port      : 1024
Number of Ports : 64511

That appears to interfere with WSL mirrored networking.

I restored the normal Windows TCP dynamic port range:

netsh interface ipv4 set dynamicportrange protocol=tcp startport=49152 numberofports=16384
netsh interface ipv6 set dynamicportrange protocol=tcp startport=49152 numberofports=16384

Then I did a full Windows reboot.

After rebooting:

wsl -d Ubuntu-24.04

Mirrored networking started normally again.

No more:

CreateInstance/CreateVm/ConfigureNetworking/0x8007054f

and no more:

Failed to configure network (networkingMode Mirrored)

My Windows-hosted applications can also reach the MCP servers/services running inside WSL normally again.

Hopefully this saves someone else from spending months randomly restarting WSL and wondering why mirrored networking only works sometimes.


r/bashonubuntuonwindows • • Sep 13 '26

WSL1 WSL on Windows

0 Upvotes

keep getting error 14098 when trying in win powershell the code wsl -install kali-linux and cannot fix the problem i asked chatgpt all of my problems but ran out of answers, can someone help me with this wsl problem and install kali linux?? p.s. i have win11 pro and little exp, and i looked even on the microsoft website and no answer to the code


r/bashonubuntuonwindows • • Sep 10 '26

WSL1 What is the list of distro that can still run/have good compatibility with wsl1??

6 Upvotes

I already tried debian and probably Ubuntu will run in wsl1 too,but i wanted to know more distro that can still run in wsl1 iirc arch cant run in wsl1


r/bashonubuntuonwindows • • Sep 09 '26

HELP! Support Request WSL1 Ubuntu broke after I tried moving it to D: drive

5 Upvotes

So I installed wsl and Ubuntu by following this guide (https://protocols.hostmicrobe.org/conda) but since I’m short on disk space on my C: drive I moved it to D: by exporting it as a .tar file and importing it on D:. Since I did that typing “wsl” or “wsl -d Ubuntu” doesn’t bring up the bash prompt anymore. I tried reinstalling Ubuntu and wsl and the issue persists. (Also, when installing Ubuntu, powershell hangs on “Provisioning the new WSL instance…” and when I enter anything it just says “invalid username” or something similar)

I’m on windows 10. I’m desperate and totally out of my depth here so any help would be appreciated.

edit: it seems like the only way for me to get what I want is to open the Ubuntu console from the start menu and type "/bin/bash -i" - I'd appreciate any help in finding a permanent fix


r/bashonubuntuonwindows • • Sep 07 '26

self promotion WSL Manager 2.0 is out: remote WSL over SSH, .wsl distro packages, an MCP server, and a macOS build

46 Upvotes

Dev of WSL Manager here (the app used to be called WSL Distro Manager). 2.0 is out, biggest release since I started it in 2021.

New in 2.0:

- Remote WSL: manage the WSL install on another Windows machine over SSH

- Distro packages: pack a configured distro into a portable .wsl file that installs anywhere (replaces templates)

- Rewritten .wslconfig and wsl.conf editors, disk/VHD mounting, snippets with sharing

- Full UI pass: keyboard operable, real error messages, dark/light, 10 languages

- macOS build (beta): same app, but it runs native Linux VMs via Apple's Virtualization framework

- Pro (paid, one-time): AI chat that can actually operate your distros, an isolated AI workspace, and an MCP server so Claude Desktop / Claude Code / opencode can drive WSL

Managing distros stays free and open source. 2.0.1 followed with a macOS crash fix and self-updates for the non-Store builds.

Repo: https://github.com/bostrot/wsl2-distro-manager

Release notes: https://github.com/bostrot/wsl2-distro-manager/releases/tag/v2.0.0

Microsoft Store, winget, scoop and brew links are in the README.

Bug reports welcome, happy to answer questions.


r/bashonubuntuonwindows • • Sep 08 '26

self promotion https://github.com/weaselway/#weaselway

0 Upvotes

I might have to use Windows soon but did not want to miss out on my beautiful gnome desktop. Options for running gnome fullscreen seemed pretty limited, so I (and my friend Claude) build this. Some patches to mutter and mesa to make it actually fast and to get gpu acceleration in Chrome and Firefox. Audio also works using pipewire.

This should work best with an integrated gpu that can share memory with the cpu. I could only test it in a 10 year old laptop for now.


r/bashonubuntuonwindows • • Sep 05 '26

WSL2 Claude Cowork won't start on Win11 25H2 — Deep dive into WSL2/Hyper-V failure: everything tried, everything found [Ryzen 5 5600X / Gigabyte B450M DS3H V2]

0 Upvotes

I've spent weeks trying to get Claude Cowork (Anthropic's desktop AI tool)
working on Windows 11 25H2. It requires WSL2 to run its workspace container.
This post documents everything I found — maybe it helps someone or someone
here has the final piece.

HARDWARE & OS

  • CPU: AMD Ryzen 5 5600X (Zen 3)
  • Motherboard: Gigabyte B450M DS3H V2
  • RAM: 32GB
  • GPU: NVIDIA RTX 3060
  • OS: Windows 11 Pro 25H2 — Build 26200.9278 (fully updated as of Sep 2026)

THE SYMPTOM
Claude Cowork fails to start its workspace with:
HRESULT 0x80370102 (hypervisor not running)

Running wsl --install -d Ubuntu manually reproduces it:
Wsl/InstallDistro/Service/RegisterDistro/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED

WHAT IS CONFIRMED CORRECT

  • SVM Mode: Enabled in BIOS (verified visually)
  • IOMMU: Enabled in BIOS (changed from Auto to Enabled — no effect)
  • VirtualizationFirmwareEnabled: True (WMI)
  • HypervisorPresent: True (WMI) — meaning VBS is running
  • bcdedit hypervisorlaunchtype: Auto
  • vmcompute: Running (Manual)
  • WslService: Running (Automatic)
  • Windows features all enabled: VirtualMachinePlatform ✅ HypervisorPlatform ✅ Microsoft-Hyper-V-All ✅ Microsoft-Windows-Subsystem-Linux ✅
  • Memory Integrity (HVCI): Disabled
  • SecurityServicesRunning: {0} — VBS active but no security services inside it
  • SFC /scannow and DISM /RestoreHealth: no violations

EVERYTHING TRIED (all failed)

  1. Enabled all Hyper-V features via Windows Settings and DISM
  2. Multiple full shutdowns (shutdown /s /t 0)
  3. Disabled Fast Startup (powercfg /h off)
  4. netsh winsock reset + reboot
  5. Enabled IOMMU in BIOS (was on Auto)
  6. DISM disable all Hyper-V features → full shutdown → re-enable
  7. wsl --install --no-distribution
  8. Checked and confirmed SVM Mode enabled visually in BIOS
  9. Tested across Windows Updates: KB5094126, KB5095093, KB5121003, 26200.9278
  10. Full Windows clean reinstall (didn't help — 25H2 ISO was the only one available from Microsoft at the time)

KEY FINDINGS

  1. hvsocket provider is missing from Winsock catalog: netsh winsock show catalog | findstr -i "hv" → Returns nothing This was likely caused by running netsh winsock reset as a troubleshooting step. Re-enabling Hyper-V features via DISM did not restore it.
  2. HCS log channel does not exist: wevtutil sl "Microsoft-Windows-Hyper-V-Compute/Operational" /e:true → "channel not found" The HCS operational log was never created — meaning HCS never fully initialized.
  3. hcsdiag list returns nothing — no output, no error.
  4. Get-WinEvent on System log returns zero Hyper-V/HCS entries.

This points to HCS never completing its initialization, likely because
the hvsocket Winsock provider is missing. The chicken-and-egg problem:
HCS needs hvsocket to initialize, but hvsocket is only re-registered
by HCS during initialization.

OPEN QUESTIONS

  • Is there a way to manually re-register the hvsocket Winsock provider without a full OS reinstall?
  • Is there a specific DLL or component registration that targets only the HCS/Hyper-V Winsock providers?
  • Has anyone seen this specific combination of symptoms (missing hvsocket
    • no HCS log channel) and found a fix that isn't a clean reinstall?

r/bashonubuntuonwindows • • Aug 29 '26

WSL2 Update: Turning idle GPU VRAM into an 8.74 GiB/s Tiered Swap for WSL2 — Linux 6.18 Kernel Driver, 4-Tier Memory Cascade & Anti-Hang Benchmarks

14 Upvotes

Hi everyone,

Following up on our previous post about using idle GPU VRAM to stop WSL2 build freezes, we completed the next major milestone: a 4-Tier Progressive Memory Cascade, an upstream Linux 6.18 Kernel Block Driver (drivers/block/ramshared), and an LKML patchset formatted for the linux-block subsystem.

THE PROBLEM WE SOLVED When compiling large workspaces (Rust multi-crates, C++, Android, Chromium) or running local container stacks on a 16GB machine, WSL2 physical RAM exhausts. The Hyper-V guest starts thrashing disk swap through the heavy virtualization chain: ext4 -> VHDX -> Hyper-V -> NTFS -> Host SSD (>2.1 ms latency spikes), freezing the VM, terminal, and VS Code server.

Meanwhile, nvidia-smi shows 4GB to 8GB of ultra-fast GDDR6 VRAM sitting completely idle during compilation.

THE 4-TIER PROGRESSIVE MEMORY HIERARCHY Rather than treating VRAM as a blind replacement, we architected a 4-tier pipeline: 1. Tier 1 (Physical RAM - 16 GB): Full system speed. 2. Tier 2 (Compressed ZRAM LZ4 - 1 GB): Ultra-low overhead in-memory compression. 3. Tier 3 (GPU VRAM Block Device - 4 GB): Direct PCIe Gen3/4 DMA buffer via drivers/block/ramshared or ublk (/dev/ublkb0). 4. Tier 4 (Host SSD Writeback - 4 GB): Authoritative persistent fallback via CONFIG_ZRAM_WRITEBACK=y.

VALIDATED BENCHMARK DATA (Real Host Hardware - RTX 2060 / PCIe Gen 3 x16) - Host-to-Device (H2D) DMA Throughput: 8,947.71 MiB/s (8.74 GiB/s) in 28.6 ms. - Device-to-Host (D2H) DMA Throughput: 6,530.22 MiB/s (6.38 GiB/s) in 39.2 ms. - 4KB Direct I/O Median Block Latency: 231 us (4,013 IOPS on /dev/ublkb0). - Memory Reclaim Speed: 8,386.4 MB/s (8.19 GB/s) restored in 732 ms. - Continuous Saturation Stress Test: 9,160 MB active swap held across 40 continuous saturation cycles with zero kernel panics and zero Hyper-V freezes (see attached live TUI telemetry dashboard).

PREEMPTIVE FAQ (Addressing Community Questions)

Q1: What happens if I launch a heavy Windows game or a CUDA model? Will WSL2 crash? No. RamShared includes an active VRAM pressure watchdog. If Windows or another host process demands GPU memory, the driver safely drains pages to Tier 4 (the authoritative host SSD) with 100% SHA-256 cryptographic match (0 bit flips). It never panics the kernel or drops data.

Q2: Isn't ZRAM faster than GPU VRAM? Yes, for the first ~1GB. That's why ZRAM is Tier 2. VRAM only kicks in as Tier 3 when ZRAM is completely saturated. VRAM transfers at 8.74 GiB/s over PCIe, making it ~44x faster than spilling directly onto the Windows SSD.

Q3: Do I need to compile a custom kernel to use this? You have two options: 1. Userspace Mode (Zero Kernel Compilation): Runs on stock Linux 6.0+ via ublk and io_uring. 2. Native Kernel Driver: Compilable reference branch on linux-msft-wsl-6.18.y with CONFIG_BLK_DEV_RAMSHARED=m and CONFIG_ZRAM_WRITEBACK=y.

Q4: Why not just buy 64GB of RAM? On soldered laptops (modern ultrabooks, MacBooks, ThinkPads) or locked IT workstations where adding DIMMs isn't an option, this unlocks 4GB to 8GB of already-paid-for high-speed GDDR memory for $0.

ALL 3 PATCHES ON LORE & SOURCE CODE - Patch 0/2 (Cover Letter & Benchmarks): https://lore.kernel.org/linux-block/6a924051.e22746c9.8f0fc.bdc2@mx.google.com/T/#u - Patch 1/2 (Core Driver drivers/block/ramshared): https://lore.kernel.org/linux-block/6a924054.e22746c9.8f0fc.beb6@mx.google.com/T/#t - Patch 2/2 (Build System & Kconfig): https://lore.kernel.org/linux-block/6a924057.e22746c9.8f0fc.bf96@mx.google.com/T/#u - Official Microsoft WSL2 RFC Issue: https://github.com/microsoft/WSL/issues/41054 - WSL2 Reference Kernel Branch (6.18): https://github.com/emersonbusson/WSL2-Linux-Kernel/tree/feature/ramshared-vram-cascade-6.18 - Rust Project Repository: https://github.com/emersonbusson/ramshared

AUTHOR & CONTACT Built by Emerson Busson (Senior Systems & Full Stack Software Engineer). Always happy to discuss systems architecture, low-level Linux/Rust internals, or connect with teams building high-performance infrastructure: - GitHub: https://github.com/emersonbusson - LinkedIn: https://www.linkedin.com/in/emersonbusson/ - Direct Email: emersonbusson@gmail.com

Would love to hear your thoughts or test results if you try it on your WSL2 workloads!


r/bashonubuntuonwindows • • Aug 29 '26

self promotion I wanted a top for WSL that could also see Windows and inside containers

29 Upvotes

I spend most of my development time inside WSL, and top is usually where I look when I want to know what the machine is doing.

What I kept missing was everything just outside that view:

  • what's using CPU on the Windows side?
  • which Docker / WSL Container is busy?
  • what process inside that container is actually responsible?
  • what does the whole picture look like across WSL and Windows?

So I built wsltop.

It puts Windows applications, multiple WSL distros, Docker, WSL Containers, and processes inside containers into one terminal view.

The CPU display feels like Linux top — one busy logical CPU = 100% — and there's a tree view for digging into VM/container attribution.

It's written in Rust, MIT licensed. You can install it with:

cargo install wsltop

or use the prebuilt x86_64 release from GitHub:

https://github.com/adachi6k/wsltop

I'd love feedback from other people who basically live inside WSL — especially if you use Docker Desktop or heavy build/simulation workloads.

---

Update — v0.5.0

wsltop has grown quite a bit since this post. It now runs natively on Windows as well as WSL, while keeping the same unified view across Windows apps, multiple WSL distros, Docker, and WSL Containers.

v0.5.0 also adds a compact CPU/RAM summary with short history graphs and consistent Windows / WSL / WSLC / Docker colors. I still wanted to keep it closer to top than htop, so the simpler header is still available with --header classic.

You can now install the prebuilt binary with:

cargo binstall wsltop

or build/install from crates.io:

cargo install wsltop

Prebuilt Windows and Linux/WSL binaries are available from GitHub Releases:

https://github.com/adachi6k/wsltop


r/bashonubuntuonwindows • • Aug 23 '26

WSL2 WSL2 VirtioFS took my Windows Docker bind mount from ~3s to ~430ms

22 Upvotes

Hello folks, I was testing a small Laravel site I have set up on Windows. I’d normally put the project inside the WSL filesystem for obvious performance reasons, but I heard VirtioFS (still experimental on WSL2) could improve Windows bind mounts, so I gave it a try.

It has its own issues, but the difference was pretty substantial:

Docker + ext4/WSL filesystem: ~20ms page load
Docker + C:\ bind mount: ~3000ms
Docker + C:\ bind mount + WSL2 VirtioFS: ~430ms consistently
Native Windows PHP: ~30ms

All tests used PHP 8.4.22 with OPcache:

validate_timestamps=1
revalidate_freq=0

So PHP checks for changed files on every request, which is what I personally want in a dev environment. Save, refresh, immediately see the change.

With timestamp validation disabled, the VirtioFS version drops all the way to ~50–75ms, but that’s not particularly representative of the dev setup I wanted to test.

I’d still recommend keeping Docker projects inside the WSL filesystem for now, but going from ~3 seconds to ~430ms is a pretty huge improvement. Looks like Windows may eventually get much closer to the host-filesystem bind-mount performance macOS has had with VirtioFS.


r/bashonubuntuonwindows • • Aug 19 '26

self promotion I wrote a Linux block driver in Rust to turn idle GPU VRAM into 8.53 GB/s storage via ublk + io_uring, eliminating WSL2 OOM build thrashing

40 Upvotes

Hi everyone,

If you do heavy development on WSL2 (compiling large Rust multi-crate workspaces, C++ projects, running container stacks, or local AI inference), you've likely hit the point where WSL2 VM memory runs out, the kernel enters extreme disk swap thrashing, and the OOM-killer terminates your build.

At the same time, `nvidia-smi` shows dedicated GDDR6 VRAM sitting completely idle during compilation.

To solve this, I built **RamShared** — an open-source Rust userspace block driver that allocates idle GPU VRAM via CUDA Direct DMA and exposes it inside WSL2 as a native Linux block device (`/dev/ublkb0`) using Linux 6.0 `ublk` and `io_uring`.


Real Benchmark Numbers (`fio` 4KB Random Read, QD1 on WSL2):

* **Stock WSL2 VHDX disk swap:** ~2,114 µs (2.1 ms) latency | ~336 IOPS * **RamShared NBD (VRAM):** ~326 µs latency | ~9.6k IOPS * **RamShared ublk (io_uring):** **~8 µs** latency (264x faster / 99.6% drop) | **~22k+ IOPS** * **Continuous Read Throughput:** **8.53 GB/s** (saturating PCIe Gen3/4 x16 bus).


Why This Eliminates WSL2 Freezes:

In WSL2, standard disk swap traverses a heavy virtualization stack: `ext4 -> VHDX -> Hyper-V -> NTFS -> Host SSD`.

Every single synchronous page fault takes **>2ms**, which causes the entire VM, terminal, and VS Code server to freeze during memory spikes.

Bypassing that virtualization chain and serving swap directly from GPU VRAM via PCIe DMA with `ublk` drops page latency to **single-digit microseconds (8 µs)**, completely eliminating system stutter and OOM panics.


Upstream RFC on Microsoft WSL2:

We submitted a formal RFC proposal directly on Microsoft's official WSL repository to discuss making VRAM-backed block storage a first-class feature for Hyper-V Linux guests: 👉 **RFC Issue:** https://github.com/microsoft/WSL/issues/41054

**GitHub Repository (100% Rust):** https://github.com/emersonbusson/ramshared

Happy to answer any questions about the `ublk` setup, CUDA memory pinning, or WSL2 kernel config!


r/bashonubuntuonwindows • • Aug 19 '26

self promotion [Open Source] I built a zero-dependency, ultra-lightweight web dashboard & process manager for WSL2

Post image
5 Upvotes

Hi everyone,

I love developing inside WSL2, but I was constantly frustrated by how heavy Docker Desktop was just for inspecting containers, ports, and dev processes.

So I built **WSL Command** — a lightweight, clean web dashboard specifically tailored for WSL2/Windows development workflows.

### 🌟 Key Highlights:

- **Zero External Dependencies**: Pure Python standard library backend + vanilla ES Modules frontend. No `pip install` or `npm install` needed.

- **Ultra-light footprint**: Idle memory usage is only ~20MB (compared to several GBs from Docker Desktop).

- **Process & Container Orchestration**: Real-time CPU/RAM telemetry, active port mapping, one-click start/stop for dev servers (npm, python, compose).

- **Full i18n**: Instant English & Chinese language switching.

It's completely free and open-source under the MIT license. I'd love to hear your feedback or suggestions!

🔗 **GitHub Repository**: https://github.com/kongaiyi917-source/wsl-command

If you find it helpful for your daily WSL setup, a Star ⭐ on GitHub would be greatly appreciated!


r/bashonubuntuonwindows • • Aug 13 '26

WSL2 WSL2 Ubuntu and cron jobs

5 Upvotes

Hi. I was working through a bash tutorial and a portion talked about cron jobs. I edited the crontab for both regular user and root to run a test script. In both instances, the script never ran. /var/log/syslog shows when the crontabs were edited, etc. Also there are these entries:

2026-08-13T13:36:02.393235-07:00 t1nk3rm0b1l3 wsl-pro-service[1730]: #033[33mWARNING#033[0m Daemon: could not connect to Windows Agent: could not get address: could not read agent port file "/mnt/c/Users/computertinkerer/.ubuntupro/.address": open /mnt/c/Users/computertinkerer/.ubuntupro/.address: no such file or directory

These entries are there whether the cron job was set for the regular user or root. Any insights or tips highly appreciated. This is my first time ever dealing with cron jobs. Thanks.


r/bashonubuntuonwindows • • Aug 12 '26

HELP! Support Request What's the best way to SSH directly into WSL2 from another Linux machine?

27 Upvotes

Hi everyone,

I'm a bit confused about what the "right" way to do this is.

I have a Windows PC running Debian in WSL2, and I have another Debian laptop.

My goal is to make WSL my main development environment and SSH into it from the laptop.

I first tried using the Windows OpenSSH server with ForceCommand to launch WSL. That actually lets me log in directly into WSL, which looked perfect at first. The problem is that normal SSH commands don't seem to work.

For example:

ssh my-pc

works fine, but

ssh my-pc "pwd"

just hangs. rsync also hangs because it uses remote commands over SSH.

So I started wondering if this is just the wrong approach.

I already have sshd running inside WSL, but since WSL is using NAT, it gets a 172.x.x.x IP that changes, so I don't know if that's supposed to be the way either.

I've been reading about mirrored networking, port forwarding, Windows OpenSSH, etc., and now I'm more confused than when I started.

For those of you who use WSL as your main Linux machine, what's the recommended setup nowadays?

Ideally I'd like:

  1. ssh my-pc

  2. ssh my-pc "command"

  3. rsync

  4. scp

  5. VS Code Remote SSH

to all work without weird workarounds.

Am I overcomplicating this? How are you guys doing it?

Thanks!