WSL: Use Symbolic Links to Speed Access to Common Directories

WSL: Use Symbolic Links to Speed Access to Common Directories

In a Windows Subsystem for Linux (WSL) shell, you can use symbolic links to simplify access to Windows directories that you access frequently.

Specifically, in my home directory, I create symbolic links to various directories. Then I can quickly and easily navigate to those directories in the shell or use my o command to open the directory in Windows Explorer.

To create a symbolic link, use the ln command with the -s option:

ln -s `wslpath "<windowsPath>"` [linkname]

I changed to my home directory (~) and used these commands:

ln -s `wslpath "C:\temp"`

ln -s `wslpath "C:\data"`

path=`wslpath "C:\program files (x86)"`; ln -s "$path" x86

path=`wslpath "C:\program files"`; ln -s "$path" x64

Now I can enter cd ; cd x64 to get to change the working directory to C:\program files. Unfortunately, the prompt and pwd commands show the location of the symbolic link rather than the actual path (I imagine that there is some way to change this).

For some reason, I also moved my shortcut commands to a directory on the Windows file system and made /bin a symbolic link to that. I guess I am worried about something going wrong with WSL and losing my shortcut commands. I guess I should make my .bashrc file a symbolic link as well.

To view or add a comment, sign in

More articles by John West

  • Today's Muskbot Conversation

    Roger L (which I cannot tag and which apparently has no last name, appears to have joined LinkedIn in April 2007 (hmm…

  • grok on Musk

    how can musk benefit himself financially through association with DOGE and the US government? How have his interests…

  • I’m Concerned About Elon Musk

    This is a rambling post because what I found changed my intention. According to Snopes itself: https://www.

    1 Comment
  • Is There Any Money Left?

    I try not to talk about any charity efforts in my personal life, but something has changed recently. I’ve had some…

  • What are the best thoughts in and things to come from Islam?

    So strange how any religion can be manipulated when human power structures get involved, and especially scary when…

  • He Will Do It Anyway

    is it possible for the president of the USA to be held accountable for an illegal order to the military? ChatGPT said:…

  • ChataGPT: how did slavery result in the department of education

    Slavery’s role in the creation of the U.S.

    11 Comments
  • Will China Take Taiwan Soon?

    Update April 18, 2025: I wrote this before the insane US tariffs and have not updated it to reflect their potential…

  • The Impracticality of Humanoid Robots: Engineering Challenges and Better Alternatives

    The following thread inspired me to do a little research (and by that, I mostly mean prompting an untrustworthy source…

  • Got my $20/worth of LLM for February 2025.

    Along the way: "At its peak, a fascist cult is almost impossible to stop from the inside without massive external…

Insights from the community

Others also viewed

Explore topics