Windows Terminal: Changing the Default Shell to WSL Ubuntu

If you're anything like me, you spend a massive chunk of your day staring at a terminal. Windows has come a long way, but for many developers myself included nothing beats the comfort, power, and familiarity of a true Linux environment.
For the longest time, opening Windows Terminal meant being greeted by PowerShell or the legacy Command Prompt. But my entire developer setup, from my custom aliases to my tailored configurations, lives in WSL (Ubuntu). My dotfiles are meticulously maintained over at my GitHub repository to ensure my environment is as personal and efficient as possible.
The goal? Make Windows Terminal launch straight into WSL Ubuntu by default, skipping the extra clicks. It turns out, it’s incredibly straightforward. Here’s how I journaled my setup.
Why WSL Ubuntu?
Before we dive into the "how", let's quickly touch on the "why". A Linux base is often non-negotiable for modern web and backend development. Utilizing Windows Subsystem for Linux (WSL) allows me to run a full Ubuntu environment seamlessly on Windows.
Coupled with my dotfiles, I get my customized prompt, scripts, and package managers instantly. I don't want to type wsl every time I open a new tab. I want my personal sanctuary right out of the gate.
The Fix: Changing defaultProfile
Windows Terminal uses a comprehensive settings.json file for configuration. To change the default shell, we just need to tell it which profile's unique identifier (GUID) to load first.
Step 1: Open Windows Terminal Settings
Open up Windows Terminal. Click on the down-arrow next to the new tab button (+) and select Settings, or simply hit the shortcut: Ctrl + ,.
Step 2: Access the JSON file
While the Settings GUI is great, we want to pop the hood. Click on Open JSON file at the bottom left of the settings menu (usually represented by a small {} icon). This will open settings.json in your default code editor.
Step 3: Locate your WSL Ubuntu Profile
Scroll down to the "profiles" section block. Under "list", you will see entry objects for all your available shells—PowerShell, Command Prompt, Azure Cloud Shell, and crucially, your WSL distributions.
Look for the one named Ubuntu or Ubuntu-24.04. It'll look something like this:
{
"guid": "{039d9cf2-9f28-5a8f-8d77-2c9429288239}",
"hidden": false,
"name": "Ubuntu-24.04",
"source": "Microsoft.WSL"
}
Copy that exact "guid" string. In my case, it's {039d9cf2-9f28-5a8f-8d77-2c9429288239}.
Step 4: Update the Default Profile
Now, scroll back up to the top of settings.json. Look for the key "defaultProfile".
It is probably set to the PowerShell GUID currently:
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
Replace that old GUID with the one you just copied for Ubuntu:
"defaultProfile": "{039d9cf2-9f28-5a8f-8d77-2c9429288239}",
Save the file.
Bonus: Bootstrapping My Dotfiles in WSL
Once WSL Ubuntu is set as our default profile, the next crucial step is making it feel like home. If you are starting fresh, your Ubuntu environment will be bare-bones. This is where the true power of a dotfiles repository shines.
Here is the exact flow I use to provision my terminal inside WSL:
-
Clone the Repository: First, bring the configurations into your home directory.
git clone https://github.com/EgiStr/dotfiles.git ~/dotfiles cd ~/dotfiles -
Install Dependencies: I have an installation script that grabs all the necessary packages for my workflow (Zsh, Neovim, Alacritty, tmux, etc.). Note that this requires
sudo.chmod +x scripts/install.sh ./scripts/install.sh -
Link Your Configurations: Finally, run the bootstrap script to create symlinks from the repository to your home directory. Don't worry, it backs up any existing files with a
.bakextension.chmod +x scripts/bootstrap.sh ./scripts/bootstrap.sh
After a quick shell restart (or changing your default shell with chsh -s $(which zsh)), the environment goes from a stark, default bash prompt to a fully personalized command center.
The Result
That's it! Close your Windows Terminal and fire it back up. You should immediately drop into your personalized, Linux-based WSL Ubuntu shell.
For me, this means an instant connection to my customized bash/zsh environment, synced directly from my EgiStr/dotfiles. No friction, just straight into building.
Taking control of your tooling is step one to becoming a more productive developer. Making it personal makes it enjoyable. Happy coding!