I would like to mount drive D on /home directory in WSL while letting C drive to be mounted on /mnt or not mounting it at all. How can I do that?

I figured it out. There is a setting to mount manually instead of automount.

To disable [automount] I should set enable key in wsl.conf to false. Here is my /etc/wsl.conf:

[automount]
enabled=false
mountFsTab=true

Also, I should have added the following line to fstab.

D:  /home   drvfs   defaults    0 0

and it did work. Just do not forget to have .bashrc and .profile in your D drive.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.