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

Often times, you may find yourself 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

I write guides on Software Engineering, Data Science, and Machine Learning.

Background

Full-stack engineer who builds web and mobile apps. Now, exploring Machine Learning and Data Engineering.

Writing unmaintainable code since 2010.

Skill/languages

Best: JavaScript, Python
Others: Android, iOS, C, React Native, Ruby, PHP

Work

Engineering Manager

Location

Kuala Lumpur, Malaysia

Open Source
Support

Turn coffee into coding guides. Buy me coffee