You are here: Home » How do I configure a WSL distro to launch in the home directory in Terminal?

How do I configure a WSL distro to launch in the home directory in Terminal?

by Jonathan Dough

Have you ever opened your WSL (Windows Subsystem for Linux) and landed in some strange directory like /mnt/c/Windows/System32? Confusing, right? Don’t worry — we’ve got your back. Let’s make WSL open right where you want it — your home directory — every time!

It’s super easy. Let’s walk through it step by step and have some fun along the way.

🎯 What’s the Goal?

We want Windows Terminal to open WSL and drop you straight into your home directory (like /home/yourusername) instead of that odd place in your Windows filesystem. Basically, home sweet home.

🛠️ Step 1: Open Windows Terminal Settings

Here’s how to get started:

  1. Open Windows Terminal.
  2. Click the little down arrow next to the tab.
  3. Select Settings.

This opens a slick settings window (JSON? GUI? You might see either).

🔍 Step 2: Find Your WSL Profile

Once you’re in settings, it’s time to find your WSL profile. It might just say “Ubuntu” or “Debian.”

  • Look under Profiles.
  • Find the one that says Source: WSL.
  • Click it to customize!

📝 Step 3: Set the Starting Directory

Look for a field called Starting directory. This is where the magic happens.

Enter the following:

\\wsl$\Ubuntu\home\yourusername

Of course, you’ll want to replace yourusername with your actual Linux username. If you’re using a different distro like Debian or Fedora, replace Ubuntu with that.

So, if your username is alex, it would look like:

\\wsl$\Ubuntu\home\alex

This makes Windows Terminal start the session in your WSL home directory. Boom! 🎉

🧠 Tip: Not Sure What Your Username Is?

Pop open your WSL terminal and just type:

whoami

It will tell you your username. Simple as that.

👀 Alternate Method: JSON Mode (For the Brave)

If you prefer JSON (hey, some of us do!), here’s what you need to do.

Scroll down in the settings and look for your WSL profile in the JSON.

Add this line to your profile object:

"startingDirectory": "//wsl$/Ubuntu/home/alex"

Make sure you get the commas right and you’re inside the curly brackets!

Save and close the file. Done and dusted.

🚀 Launch and Test

Now close and reopen your Windows Terminal.

Open your WSL distro — tada! You should now start in your cozy little home directory.

No more wandering in the Windows filesystem jungle!

🧽 Bonus Tip: Use ~ Instead!

Lazy? Or just efficient? No problem.

Instead of typing \\wsl$\Ubuntu\home\alex, use:

~

The tilde (~) is a shortcut to your Linux home directory. Works like magic!

So your startingDirectory line becomes:

"startingDirectory": "~"

That’s less typing and more relaxing. 😎

🎉 You Did It!

Now every time you pop into WSL via Windows Terminal, you’ll start exactly where you want to be.

It’s your Linux home. Cozy, familiar, and ready to accept your awesome commands.

🧩 Recap — What Did We Learn?

  • How to open Windows Terminal settings.
  • How to change the starting directory for WSL.
  • The quick and lazy way using a tilde (~).

So go ahead — configure away! Your command-line adventures just got easier.

Techsive
Decisive Tech Advice.