Scott Hanselman

A new Console for Windows - It's the open source Windows Terminal

May 3, '19 Comments [18] Posted in Open Source | Win10
Sponsored By

"My fellow Windows users, our long national nightmare is over." The Windows Terminal is here, it's open source, it's real, and it's spectacular. It's very early days to be clear, but the new Windows Terminal is open source and it's up at https://github.com/microsoft/Terminal for you to check out.

The repository includes

  • Windows Terminal
  • The Windows console host (conhost.exe) - a local copy that is separate from the built-in Windows one. 
  • Components shared between the two projects
  • ColorTool
  • Sample projects that show how to consume the Windows Console API

And even better, it'll be, as they say:

Windows Terminal will be delivered via the Microsoft Store in Windows 10 and will be updated regularly, ensuring you are always up to date and able to enjoy the newest features and latest improvements with minimum effort.

How do you get it? TODAY you clone the repo and build your own copy. There will be early builds in the Store this summer and 1.0 should be out before the end of the year.

As of today, the Windows Terminal and Windows Console have been made open source and you can clone, build, run, and test the code from the repository on GitHub: https://github.com/Microsoft/Terminal

This summer in 2019, Windows Terminal previews will be released to the Microsoft Store for early adopters to use and provide feedback.

This winter in 2019, our goal is to launch Windows Terminal 1.0 and we’ll work with the community to ensure it’s ready before we release!

So today, yes, it'll take some effort if you want to play with it today. But good things are worth a little effort. Here's some of the things I've done to mine. I hope you make your Windows Terminal your own as well!

Windows Terminal

When you click the menu, check out Settings, which will open your profile.json in your JSON editor. I use VS Code to edit. You'll need to run Format Document to make the JSON look nice as today it may show up on one line.

You can create color profiles in the "schemes" node. For example, here's my "UbuntuLegit" color theme in my profiles.json.

{
"name": "UbuntuLegit",
"foreground": "#EEEEEE",
"background": "#2C001E",
"colors": [
"#4E9A06", "#CC0000", "#300A24", "#C4A000",
"#3465A4", "#75507B", "#06989A", "#D3D7CF",
"#555753", "#EF2929", "#8AE234", "#FCE94F",
"#729FCF", "#AD7FA8", "#34E2E2", "#EEEEEE"
]
}

Here's an example profile with all the settings I know about set. This is for "CMD.exe"

"profiles": [
{
"startingDirectory": "C:/Users/Scott/Desktop",
"guid": "{7d04ce37-c00f-43ac-ba47-992cb1393215}",
"name": "DOS but not DOS",
"colorscheme": "Solarized Dark",
"historySize": 9001,
"snapOnInput": true,
"cursorColor": "#00FF00",
"cursorHeight": 25,
"cursorShape": "vintage",
"commandline": "cmd.exe",
"fontFace": "Cascadia Code",
"fontSize": 20,
"acrylicOpacity": 0.85,
"useAcrylic": true,
"closeOnExit": false,
"padding": "0, 0, 0, 0",
"icon": "ms-appdata:///roaming/cmd-32.png"
},

I like the "vintage" cursor and I make it bright green. I can also add icons in this location:

%LOCALAPPDATA%\packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState

So I put some 32x32 PNGs in that folder and then I can reference them as seen above with ms-appdata://

Cool Icons

I'll go into more detail about what's happening in each of these profiles/tabs in the next post! I've got a few creative ideas for taking MY Windows Terminal to the next level.

"defaultProfile": "{7d04ce37-c00f-43ac-ba47-992cb1393215}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"experimental_showTabsInTitlebar": true,
"requestedTheme": "dark",

Here I've set the theme to dark using "requestedTheme" even though I run Windows in a light theme. I'm setting the tabs to be shown all the time and moved the tabs into the TitleBar.

Here's my Ubuntu tab with the UbuntuLegit color theme above:

Nice Ubuntu Colors

Notice I'm also using Powerline in my prompt. I'm using Fira Code which has the glyphs I need but you can certainly use patched Powerline fonts or make your own fonts with tools like those from Nerd Fonts and it's font patcher. This font patcher is often used to take your favorite monospace font and add Powerline glyphs to it.

NOTE: If you see any weird spacing issues with glyphs you might try using --use-single-width-glyphs to work around it. By release all these little issues I assume will be worked out. I had no issues with Fira Code in my case, your mileage may vary.

This new Windows Terminal is great. As mentioned, it's super early days but it's amazingly fast, runs on your GPU (the current conhost runs on your CPU) and it's VERY configurable.


Sponsor: Manage GitHub Pull Requests right from the IDE with the latest JetBrains Rider. An integrated performance profiler on Windows comes to the rescue as well.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb
Tuesday, May 07, 2019 4:48:13 AM UTC
What is the difference between PowerShell and Windows Terminal?
Arnab Roy Chowdhury
Tuesday, May 07, 2019 4:59:27 AM UTC
Windows Terminal is a console host that hosts other things. It owns the border/frame/chrome around the other things. You can run cmd.exe, powershell.exe, wsl, etc.
Tuesday, May 07, 2019 5:55:40 AM UTC
What is the Cascadia Code font that you're using for cmd.exe?
Tuesday, May 07, 2019 6:01:46 AM UTC
George - That is a new font coming soon with the Windows Terminal!
Tuesday, May 07, 2019 10:06:57 AM UTC
That actually looks really neat and releasing it as open source just made my day. I like where this new Microsoft is heading.
Tuesday, May 07, 2019 1:16:47 PM UTC
What is the actual .exe that you run to get the new tabbed UI? I've cloned the repo and built it using the razzle/bcz tools, but when I run x64/bin/WindowsTerminal.exe nothing happens. The e.g. "opencon" tools just open the old command host.
tobias
Tuesday, May 07, 2019 1:19:21 PM UTC
Is there any way the exe can be obtained? My windows 10 version is not compatible to build on my own it looks like based on the issue reported on GitHub repo.
Renil Abdulkader
Tuesday, May 07, 2019 1:33:10 PM UTC
Is there a pre-compiled package somewhere?
Alec Breen
Tuesday, May 07, 2019 5:27:18 PM UTC
This guy made pre-compiled versions for x86, x64 and arm64:
https://twitter.com/thebookisclosed/status/1125480984068153344
Mario Kneidinger
Wednesday, May 08, 2019 9:43:22 AM UTC
Hi Scott,
Do you mind sharing the steps you followed to get it to compile. I can't seem to get it to work...

Tried both VS2017 and VS2019 with the appropriate workloads installed (I think).
Nick Muller
Thursday, May 09, 2019 3:54:34 AM UTC
Any plans for unicode (Arabic language in specific) support this time ?
Jalal EL-SHAER
Thursday, May 09, 2019 12:45:58 PM UTC
Any chances this can be used as the terminal when debugging console apps via visual studio? Slow stdout makes my cry...
ESG
Thursday, May 09, 2019 1:09:14 PM UTC
Hi Scott.
Very nice, please instruct us on how to build and run.
(I actually upgraded the Windows SDK version and build but cannot find how to run)
Thanks
Luis Matta
Friday, May 10, 2019 7:43:17 AM UTC
It's great that Console is (finally) getting some love from M$. The commandline team has also a great blog series about Console internals.

Personally, I've been using ConEmu as my default console app for years (Quake mode rulez!) - I suppose it will be hard to beat that. Are there any advantages that the new Terminal do (or will) have?
Friday, May 10, 2019 8:37:42 PM UTC
Any chance you could put your profiles and png's in Github?
Josh
Saturday, May 11, 2019 3:23:44 PM UTC
Does it have a split? My typical day is at least 5 terminal splits open in https://cmder.net/
Shiju Samuel
Sunday, May 12, 2019 2:50:05 PM UTC
I should it is amazingly fast given that it's nothing more than a host for other shells. At the moment that's all this is.

Powershell being reworked to being amazingly fast would be news.
Thursday, May 16, 2019 7:33:28 AM UTC
Excellent post ! Will help a lot of Devops Engineers ad Developers who doesnt use Mac or Unix , and will integrate with all DevApps Universe in IT !

Good for Microsoft , and good forall of us !
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.