How to Add WSL to Windows Terminal (Easily!)

Are you struggling to add WSL to your Windows terminal after installing WSL on your Windows computer? Adding WSL to your Windows terminal helps you consolidate multiple command-line interfaces such as CMD, Git Bash and WSL into a single window thereby increasing your productivity and efficiency.

In this easy-to-follow guide, I will show you how to add WSL to your windows terminal.

open windows terminal

1. Open Terminal:

Fire up your Windows Terminal.

open windows terminal settings

2. Navigate to Settings:

Click the dropdown icon located beside the tabs to reveal the menu list. Select "Settings" from the list.

duplicate an existing WSL profile

3. Add a New Profile:

Scroll down to the bottom of the settings page and spot the plus icon. Click on it to add a new profile. Instead of creating a new profile from scratch, we'll duplicate an existing profile. I prefer to start with CMD as it's the most basic. Select CMD from the dropdown menu and hit the duplicate button. A new profile named "Command Prompt (Copy)" will appear in the profile list on the left pane.

edit your new profile

4. Edit your New Profile:

Fill the fields of your duplicated profile as follows:

Name:

Label your new profile. I'll go with "WSL," but you can choose whatever suits you best. Your new profile name will replace the old "Command Prompt (Copy)". See yellow box in above screenshot.

Command Line:

Replace "cmd" with "wsl" to launch the terminal with WSL. Your command line should look like this: %SystemRoot%\System32\wsl.exe.

Starting Directory:

Put the tilde '~' symbol here so that the terminal always opens in the user's home directory.

copy linux icon name

Icon:

Windows Terminal already has icons for Linux. Navigate to C:\Program Files\WindowsApps and find one or more folders starting with "Microsoft.WindowsTerminal_." Look for the one containing a "profileIcons" folder. Copy the name of the Linux icon and paste it into the icon field. Voila! Your icon changes instantly. See yellow box in above screenshot.

Tab Title:

Give your terminal tab a label.

Save your changes

5. Save Your Changes:

Once you've made the necessary edits, click on "Save."

open your WSL tab

7. Select Your New Profile:

Now, click on the dropdown menu in the navigation bar. You'll see your newly created profile. Click on it to open an Ubuntu (or your preferred Linux distro) terminal ready for action!

And that's it! You've successfully added WSL to windows terminal. Easy, isn't it?

Happy hacking!

final window showing WSL in Windows terminal