Skip to main content

Command Palette

Search for a command to run...

Quick Tip - Customizing WSL Starting Directory

Updated
1 min read
Quick Tip - Customizing WSL Starting Directory
A

Hi, I’m Alvin! I write about tech, and love sharing what I learn. If you have any questions or suggestions, please reach out - I'm always up for a quick chat.

If you’re using WSL like I am on Windows 11 - you most likely have run into the issue where launching WSL from the applications menu was starting you at /mnt/c/windows/system32:

If you need to customize this to work in your home directory, you can customize it in the properties of the application.

First, you need to open the file location - since this is a shortcut:

Once there, right click and hit properties:

Finally, in the “Start in” field, type in ~/:

Once you click apply, and you most likely will need to approve as an administrator, you can start a new WSL session and you’ll be in your home directory:

🎉🎉🎉 You’re now starting in the default directory when launching WSL.


References

WSL starting in /mnt/c/windows/system32

https://superuser.com/questions/1732336/wsl-starting-in-mnt-c-windows-system32

More from this blog

Alvin Crespo | Engineering Leader

48 posts

Welcome! Here, software development meets creativity and quirkiness. Hopefully, you'll find my tutorials and random thoughts insightful and inspiring for all your software adventures.