/ Programming

How to create shortcut to access Windows files in Windows Subsystem for Linux (WSL)

Often times, I find myself accessing Windows files from Windows Subsystem for Linux (WSL). The Windows drives can be found via /mnt. From there on, you can cd to any drive such as cd /mnt/c. An path for Windows document files would be something something like /mnt/c/Users/<my_user>/Documents.

However, it is often tedious to cd into the Windows user directory as I often do. Fortunately, you can make the process simpler with the creation of symlinks.

ln -s /mnt/c/Users/<my_user>/ ~/win

Instead of having to do cd /mnt/c/Users/<my_user> every single time, you can now just do cd ~/win to go to the same directory.

If you wish to remove the symlink, just do a regular rm just like how you would remove any other file e.g. rm ~/win.

Wei-Ming Thor

Wei-Ming Thor

I am a programmer based in Kuala Lumpur, Malaysia. I write guides on programming and running a software business.

Read More