--- date: 2025-11-03 title: winpodman description: use podman to run linux code in a container on windows preview_image: tags: programming permalink: /blog/28/ --- my windows machine is a surface tab 5 LTE from like 2015 and it has fairly limited internal storage so most of my code is on a 512GB microsd card that I leave connected at all times. this used to work fine. when you start WSL (windows subsystem for linux), it mounts C:\ as /mnt/c and D:\ as /mnt/d. But that doesn't seem to work anymore as of WSL 2.6.0, and rolling back didn't fix it either. apparently they [broke this on purpose?!](https://github.com/microsoft/WSL/issues/11931) on Podman Desktop you can work around this, using `podman machine ssh` to go inside the Podman virtual machine and tinker with its drive mounts. So I did! Assuming you have Podman Desktop installed on Windows 10, do the following: ```ps podman machine stop podman machine set --rootful podman machine start podman machine ssh sudo echo 'D: /mnt/d drvfs defaults,uid=100,gid=1000 0 0' >> /etc/fstab sudo mkdir /mnt/d sudo mount -a exit ``` the "set --rootful" step is only needed if you want to give podman read-write access to files (e.g. if you are running a container that stores data on the host). now you should be able to run your [LAMP stack in podman](https://codeberg.org/nupanick/xp-php) on windows again :3 ok bye!