3 ms·
exactly this is the problem. As the article says >To get the full benefit of WSL 2, you’ll also want to move your project files from /mnt/c/Users/<username>/
by sandGorgon 6y ago
exactly this is the problem.
As the article says
>To get the full benefit of WSL 2, you’ll also want to move your project files from /mnt/c/Users/<username>/ over to your new ~/ Linux home directory on your new VHD. You can see the contents of this drive on the Network by going to \\wsl$\<distro name>\<username>\home or typing the command explorer.exe . from your bash prompt.
>This is your Linux filesystem and it acts and behaves as you’d expect. I made a folder called ~/projects that has all my project repos and then I open those projects in VS Code using the code . command.
i have accidentally wiped my home directory on Ubuntu VM reinstall. I cant even backup it up easily.
WSL engineers need to figure out a way to make the Linux home directory to be persistent. If we are living in the docker world, this is a solved problem - docker volumes live separately to the docker VM itself.
WSL2 needs to do something like that.
- httpsterio 6y agoGit? All of my work is backed up to git, even my dot files and config is there. For me, I try to keep my WSL "stateless" and never store anything there unless it's a copy of something.
- sandGorgon 6y agoim running a postgresql database, building docker containers, etc etc. this is a problem that needs a "docker volume" solution. git is just not enough. think in terms of people moving to Windows from Linux.
- e12e 6y ago> i have accidentally wiped my home directory on Ubuntu VM reinstall. I cant even backup it up easily. Normally, it'd live on an nfs mount, or a cifs share. If you're stuck with VMs for some reason, setting up a dedicated storage appliance would probably be the way to go.
- sandGorgon 6y agoOr it will live inside my linux dual boot...where it should. If WSL wants me to migrate to Windows...they should fix this.
- e12e 6y agoYou could alway try your luck with shared windows/Linux home on zfs...