ubuntu-wsl2-systemd-script
ubuntu-wsl2-systemd-script copied to clipboard
Linux binds aren't seen in Windows/Docker
Hi,
After installing this script bind mounts aren't visible in windows and docker/kubernetes anymore.
sudo mkdir /mnt/wsl/somedir
sudo mount --bind /some/folder/withfiles/ /mnt/wsl/somedir
ls /mnt/wsl/somedir
<shows files>
Windows explorer: \\wsl$\<distro>\mnt\wsl\somedir
<no files shown>
In bash.bashrc comment out:
# Start or enter a PID namespace in WSL2
#source /usr/sbin/start-systemd-namespace <-- this line
Restart WSL:
powershell: wsl --shutdown
Repeat these steps:
sudo mkdir /mnt/wsl/somedir
sudo mount --bind /some/folder/withfiles/ /mnt/wsl/somedir
ls /mnt/wsl/somedir
<shows files>
Windows explorer: \\wsl$\<distro>\mnt\wsl\somedir
<shows files> <-- this now works
Any ideas?