Home » How To » How to Add Ubuntu Tab to Windows Terminal in Windows 10

How to Add Ubuntu Tab to Windows Terminal in Windows 10

Microsoft recently released a new terminal application called Windows Terminal. The terminal application has a lot of features that the developers have been asking for years. One of those features is that ability to add any console window to a new tab. Let me show you how to add Ubuntu tab to the Windows Terminal.

By default, Windows Terminal comes with PowerShell and Command Prompt tabs. If you want to, you can add any number of other consols to the Windows Terminal. For example, if you are a web developer and need to add a Linux console to Windows Terminal. You can do that by adding a few lines of code in a JSON file.

Note: I assume you’ve already installed the new Windows Terminal app. If not, you can install it from the Microsoft Store.

Add Ubuntu Tab to Windows Terminal

1. Make sure that you’ve installed Ubuntu in Windows 10. If not, you can install Ubuntu in Windows 10 with just a few clicks. Follow that Ubuntu installation guide and come here next.

2. Before you can add Ubuntu tab to Windows Terminal, you need to generate a new GUID (Globally Unique Identifier). This is how Windows Terminal differentiates between different consols. To generate a new GUID, search for Ubuntu in the start menu and open it.

Ubuntu in windows terminal - open ubuntu console

3. In the Ubuntu window, execute the uuidgen command. This will give a unique GUID, copy it. We are going to need that GUID in the coming steps. So, paste it somewhere safe.

A quick tip: Select the GUID with the mouse and right-click to copy.

Ubuntu in windows terminal - generate guid

4. Now, open Windows Terminal by searching for it in the start menu.

5. In the Terminal window, click on the dropdown icon and select “Settings”.

Ubuntu in windows terminal - open windows terminal settings

6. The above action will open the profiles.json file in your default code editor. In my case, the default code editor is VS Code. In the editor, scroll down until you see the Profiles array. At the end of the array add ,.

Ubuntu in windows terminal - add a comma at the end

7. Next, copy and paste the below code under the , while replacing YOUR_GUID with the actual GUID you got in step 3.

Note: If you’ve installed a specific version of Ubuntu then modify the 5th line in the below code and add the version number too. For example, if you’ve installed Ubuntu 18.04, modify the line as wsl.exe -d Ubuntu-18.04.

"commandline":"wsl.exe -d Ubuntu",
"padding":"0, 0, 0, 0",

Ubuntu in windows terminal - add the code with guid

8. Press Ctrl + S to save the JSON file.

9. Now, go back to the Windows Terminal and click on the dropdown menu. You will see the new Ubuntu option.

Ubuntu in windows terminal - ubuntu added to windows terminal

10. Click on the Ubuntu option and the Ubuntu terminal will open in Windows Terminal.

Ubuntu in windows terminal - ubuntu working in windows terminal

Add Custom Tab Icon to Ubuntu Tab in Windows Terminal

If you look at the dropdown menu, there is no icon next to the Ubuntu option. That’s because you haven’t added any. The good thing is, you can any image you want as the Ubuntu tab icon.

1. The first thing you need to do is find the icon you want to set. The icon should be in PNG format with transparent background and 32×32 size. You can use this website to find free icons.

2. Once you have the icon, save it somewhere on your hard disk. For instance, I have a dedicated folder in my I drive that hosts all the icons I use for various folders.

3. Now, open the profiles.json file, go to the Ubuntu profile, find the “icon” value and replace the dummy icon path with the actual icon path. In my case, the icon path is “I:/System Icons/ubuntu.png”.

Ubuntu in windows terminal - add icon path

4. Save the file.

That is it. You will see the new icon applied instantly in the Windows Terminal.

Ubuntu in windows terminal - icon added to ubuntu tab

It is that simple to add Ubuntu tab to Windows Terminal. If you are facing any problems, comment below and I will try to help as much as possible.

26 thoughts on “How to Add Ubuntu Tab to Windows Terminal in Windows 10”

    1. Avatar for David

      Nevermind, apparently this is an issue they are dealing with, and a good workaround is to use “wsl.exe ~ -d Distro”, so it will start at home dir.
      By the way, your article was super helpful, thanks!

      1. Avatar for Bashkarla

        I’m glad the article helped you.

        I think you can also set startingDirectory to //wsl$/Ubuntu/home/username to start in the home directory. Give it a try.

        1. Avatar for djdaddykool

          Nope, it just goes to /mnt/c/Users/username. Not the user home in Ubuntu or whatever distro you have from the store.
          Been trying to figure this out other than a long path to the package directory in APPDATA

          1. Avatar for Mastazi

            I’ve solved it doing what David mentioned at the beginning of this sub-thread. Basically in the commandline value, you need to pass ~ as an argument to wsl.exe. Once you do that, whatever value you put in startingDirectory will be irrelevant. This works for me.

            So to recap:

            “commandline”: ““wsl.exe ~ -d Distro”, // note the “~”
            “startingDirectory”: “/whatever/it/wont/make/a/difference”

      2. Avatar for Cindy K.

        > Nevermind, apparently this is an issue they are dealing with, and a good workaround is to use “wsl.exe ~ -d Distro”, so it will start at home dir.

        Thank you, David! That’s just what I was looking for!

  1. Avatar for David Terros

    This is kinda the correct code for ubuntu cause it take the version number too –
    wsl.exe -d Ubuntu-18.04

    just type wsl.exe –list
    for all the list of distros and add accordingly.
    Thanks for the article super helpful.

      1. Avatar for Felipe


        I have installed just Ubuntu 18.04 and it was failing for me.

        It worked just after I have changed it to wsl.exe -d Ubuntu 18.04.

        Thank you very much for the article, and thank you very much for the tip David!

  2. Avatar for Moses Muchemi

    Can’t get it to run from the terminal dropdown. I have installed Ubuntu and it executes fine on its own.

  3. Avatar for bj

    I have followed the above instructions and it adds a link in the menu however when I click on it, It runs for a split of a second and closes down. I recorded the screen and ran it in slowmo to read the error “There is no distribution with the supplied name”

    I have upgraded windows, installed terminal, installed ubuntu 18.04 -LTS and ubuntu is running on my windows machine.

    1. Avatar for Bashkarla

      I think it’s a problem with the distribution name you supplied in the JSON file. Double-check the name. If you are using a specific version, you need to add that version number too. Use wsl.exe –list command to check the list of installed distributions.

  4. Avatar for bj

    wsl.exe -l returns

    ~$ wsl.exe -l
    Windows Subsystem for Linux Distributions:
    Ubuntu-18.04 (Default)

    I have checked the name and it reflects the instructions. here is what Is in my file
    “commandline”:”wsl.exe -d Ubuntu 18.04″,

  5. Avatar for Bo Qu

    Want Ubuntu as your default? In the config file, use the GUID of Ubuntu and set it in the defaultProfile key near the top of the config file.

  6. Avatar for Michael Taylor

    I installed Ubuntu on my Windows 10 system today and the install automatically added Ubuntu to the drop down menu in Windows Terminal. I was almost disappointed that I didn’t have to add it myself. 🙂

  7. Avatar for Mike

    Event easier in updated Windows Terminal:
    “guid”: “{d0b53d8e-9ee2-4dcb-b553-928eac08826c}”,
    “hidden”: false,
    “name”: “Ubuntu-20.04”,
    “source”: “Windows.Terminal.Wsl”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top