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 create practical guides on Software Engineering, Data Science, and Machine Learning.

Creator of ApX Machine Learning Platform

Background

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

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