0% found this document useful (0 votes)
12 views

How can I add Ubuntu as a profile option in Windows Terminal_ - Stack Overflow

Uploaded by

rastechethiopia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

How can I add Ubuntu as a profile option in Windows Terminal_ - Stack Overflow

Uploaded by

rastechethiopia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

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

Asked 5 years, 5 months ago Modified 8 months ago Viewed 55k times

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.
35
windows-subsystem-for-linux windows-terminal

Share Improve this question Follow edited Dec 9, 2020 at 9:27 asked Jul 2, 2019 at 6:17
mikemaccana SIDDHARTH
122k 110 424 528 VARSHNEY
651 1 8 17

1 Just install Windows Subsystem for Linux. Use command: wsl --install – Abhishek Kumar Jul 10, 2023 at 16:47

6 Answers Sorted by: Highest score (default)

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

39 Share Improve this answer Follow edited Sep 5, 2023 at 5:31 answered Sep 21, 2021 at 10:14
Timeless jmreader
7,517 9 64 95 632 7 10

This worked for me as I had installed Terminal before Ubuntu. This seems to be a newer feature of the terminal ootb integration – Matthew C Reddy Nov 1, 2021 at 5:59

Thank you! People kept writing that Ubuntu was supposed to show up automatically but it wasn't. After resetting it was there! – Max Wilder May 8, 2022 at 6:59

3 Warning: This will reset your settings.json file, so you'll lose any customization you had made. You might want to backup your settings.json file so you can easily compare
and reapply your customization after resetting. – deadlydog Oct 17, 2022 at 1:33

After reading this I've just restarted(close and open again) the Terminal app and and automatically found newly installed Ubuntu and created 2 new profiles(one is broken
though :)) – chill appreciator Jan 1, 2023 at 20:11

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,
33
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:

The final result is:

Share Improve this answer Follow edited Dec 9, 2020 at 9:23 answered Jul 24, 2019 at 8:39
mikemaccana Bravo Yeung
122k 110 424 528 9,810 6 43 49

1 why this feature is not out of of the box, whenever I install any new WSL? – SIDDHARTH VARSHNEY Jul 24, 2019 at 19:15

Maybe by design, you can submit issue here github.com/microsoft/terminal/issues . – Bravo Yeung Sep 20, 2019 at 1:11

Really liked the schema – Mohammad Mudassir Mar 16, 2021 at 9:04

For me after installing Ubuntu from Microsoft Store it is appeared like this, it should also work.

10 {
"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"hidden": false,
"name": "Ubuntu",
"source": "Windows.Terminal.Wsl",
}

Default there will be a penguin icon, you can add your own like this;
"icon": "ms-appdata:///roaming/ubuntu_32px.png"

You can place your icon file here like mentioned above.

$env:LOCALAPPDATA\packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState

Share Improve this answer Follow edited Dec 9, 2020 at 9:29 answered Jul 1, 2020 at 0:22
mikemaccana siniradam
122k 110 424 528 2,909 29 40

If Windows Terminal is already installed prior to Ubuntu WSL form the app store, open the Ubuntu app, let it install, enter a new username and
password. This will automatically add an Ubuntu profile to Windows Terminal.
7
Share Improve this answer Follow answered Jun 20, 2021 at 23:37
stemarcoh
151 1 3

And if not add automatically the new profile 🥲? – Daniel I. Cruz Aug 2, 2022 at 15:33

I noticed that installing Windows Terminal when the Ubuntu WSL is already installed automatically adds the Ubuntu profile to the WT. So reinstalling
WT might be the quickest solution.
5
Share Improve this answer Follow answered Jun 14, 2021 at 9:36
Bart Swennenhuis
323 2 11

As of 2021-07-27, this was the quickest and easiest solution for me. I installed WT first, then WSL2 and Ubuntu, but there was no profile. After reinstalling WT, the profile
was populated automatically. Note that I'm not using Windows Terminal Preview, just the standard edition. – Joe Sadoski Jul 27, 2021 at 17:42

1 Reinstalled, still but still having penguins. And it lost the settings.json. – Radzor Aug 20, 2021 at 23:36

I couldn't get the profile to show up in Windows Terminal even after following some of the steps in the other answers here, so I went into the Terminal
settings to create one manually. To my surprise, an entry for Ubuntu already existed, but the profile was hidden.
0

Turning this off brought the Ubuntu profile option back in the menu.

Share Improve this answer Follow answered Apr 6 at 11:14


aalaap
4,361 5 56 62

You might also like