Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add Ubuntu as a profile option in Windows Terminal?

I just installed the new Windows Terminal from Windows stores. I also have installed Ubuntu 18.04 WSL. But I am getting only two types of terminal options in Windows Terminal. How I can get the option of Ubuntu terminal in it. Also, I want cmd to be my default terminal in it rather than PowerShell.

like image 585
SIDDHARTH VARSHNEY Avatar asked Jul 02 '19 06:07

SIDDHARTH VARSHNEY


People also ask

How do I change the default profile in Windows Terminal?

Set the default profile that opens by typing ctrl+shift+t , typing the key binding assigned to newTab , running wt new-tab without specifying a profile, or clicking the '+' icon.

How do I enable Ubuntu on Windows 10?

Begin typing “Turn Windows features on and off” into the Start Menu search field, then select the control panel when it appears. Scroll down to Windows Subsystem for Linux, check the box, and then click the OK button. Wait for your changes to be applied, then click the Restart now button to restart your computer.


2 Answers

You need to change settings

Click "Settings" in right top corner of above image, the file profile.json file will be opened. Then inside the word "profiles" in profile.json file, add below snippet.

        {
            "guid": "{78e390db-1bff-4533-9d7c-20f53d8bafa1}",
            "name": "WSL",
            "colorscheme": "Campbell",
            "historySize": 9001,
            "snapOnInput": true,
            "cursorColor": "#FFFFFF",
            "cursorShape": "bar",
            "commandline": "wsl ~",
            "fontFace": "Consolas",
            "fontSize": 12,
            "acrylicOpacity": 0.75,
            "useAcrylic": true,
            "closeOnExit": false,
            "padding": "0, 0, 0, 0"
        }

Near the word "schemes" in profile.json file, you need to update below:

"schemes": [
        {
            "name": "Campbell",
            "foreground": "#A7B191", 
            "background": "#0C0C0C",
            "colors": [
                "#0C0C0C",
                "#C50F1F",
                "#13A10E",
                "#C19C00",
                "#0037DA",
                "#881798",
                "#3A96DD",
                "#CCCCCC",
                "#767676",
                "#E74856",
                "#16C60C",
                "#F9F1A5",
                "#3B78FF",
                "#B4009E",
                "#61D6D6",
                "#F2F2F2"
            ]
        }

The complete setting file (profile.json) which can be obtained here.

Actually, the WSL here is Ubuntu.


Besides, you can add icons to different types of tabs.

You can add icons for the Ubuntu profile to this folder:

$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bb\RoamingState 

I put some 32x32 PNG in this folder, and then in profile.json I can reference the image resource with the path starting with ms-appdata:// .

The icon is available here: Icons

Then replace the contents of the new profile-withIcons.json file below with the previous settings. profile-withIcons.json

After finishing the contents of the folder is like this:

Dir

The final result is:

Icons

like image 116
Bravo Yeung Avatar answered Sep 19 '22 08:09

Bravo Yeung


An even easier option: Go to Settings -> Apps -> Apps and features -> find 'Windows Terminal' in the list -> select 'Advanced options' then choose reset.

like image 36
jmreader Avatar answered Sep 22 '22 08:09

jmreader