Moving where WSL mounts the Windows C:\ drive.

Window Subsystem for Linux is an amazing piece of technology that is only getting better with time. Had you told me 10 years ago Microsoft would not only embrace Linux but become the top contributor to the Linux Kernel I would have laughed and walked away. Sometimes reality is stranger than fiction. As such using Linux on Windows is very much a reality. Once you use WSL a couple times you might be like me and want to change where WSL mounts the C:\ file system inside the WSL environment. Turns out, it’s pretty easy.

By default the Windows file system is mounted at the /mnt/c/ directory. to change this the path edit the /etc/wsl.conf file.

Setting the value of the ‘root’ key you can mount the Windows drive wherever you want.

Re-start WSL and poof, done.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.