Windows Terminal + Cmder = ❤️
By: Wolfgang Dielingen
Tags: Windows, Terminal, Windows 10, Cmder

With the upcoming release of Windows 10 (version 2004), a bunch of new features comes in place for developers, like Windows Subsystem Linux (WSL) or Windows Terminal.

Despite the fact that Windows is not the default choice when developing, and at Talpor we have never considered ourselves Windows lovers, we believe this is a great opportunity for all those who use its OS, promising better working experiences and seamless integration with common technologies used in our development environments.

At this moment, Windows Terminal can be installed from the Microsoft Store. Its official version 1.0.x came in place a few weeks ago and integrates very well with existing consoles, such as Cmder, which we will be configuring in a few moments!

Before digging deeper, I want to show you some examples of what we are going to get in the end, because it is the most exciting part of all!

Windows Terminal running gl

Windows Terminal running git log

What do you need to get started?

Download the latest release of Cmder. I highly recommend the full version because it integrates Git easily and does not generate conflicts if you already have the client installed.

Download Windows Terminal from Microsoft Store.

Installing Cmder

Extract all the content of the compressed file that you previously downloaded into a directory of your choice, but it is recommended that you choose one that does not require administrator access so that configuration files can be successfully modified.

Furthermore, do not place Cmder in a folder that will contain spaces in the path. I recommend unzipping all the content in a new directory conveniently named Cmder inside %APPDATA% like this:

C:\Users\<User>\AppData\Roaming\Cmder

We should see something similar to this:

Cmder example directory

Afterward, we have to configure the following environment variables in order to use Cmder later without any problem.

CMDER_ROOT

C:\Users\<User>\AppData\Roaming\Cmder

ConEmuDir

C:\Users\<User>\AppData\Roaming\Cmder\vendor\conemu-maximus5

If you are using the same directory structure initially proposed, you can add the environment variables directly in your user’s environment. Otherwise, it is recommended that you add them as system environment variables.

We add the new environment variables as follows:

CMDER_ROOT environment variable

ConEmuDir environment variable

Then we should see something similar to this after completing the process:

User’s environment variables

Afterward, it is recommended to log out in order to test if our new environment variables are successfully recognized.

In order to prove this, we just have to execute these variables using the Windows + R shortcut and typing %CMDER_ROOT% or %ConEmuDir% . If everything works correctly, it should be able to show us the directories corresponding to the values entered in the environment variables.

Setting up Cmder

The configuration that we’ll make will be quite simple because we’ll not be using Cmder itself. We are only going to define the use of UTF-8 encoding after opening Cmder for the first time through Settings > Environment . Only the following line will have to be added:

chcp utf8

It should remain something similar to this:

Cmder Settings > Environment

If you want to test that everything is working correctly, you can run the following lines through Cmder, allowing you to verify that you have right support for Unicode and UTF-8 encoding:

Unicode testing support

ConEmuC -CheckUnicode

Unicode testing support

UTF-8 testing support

cmd /c %ConEmuDir%\ConEmu\Addons\utf-8-test.cmd

UTF-8 testing support

As you could probably see, the configuration that I have in Cmder is different from the one that comes by default, and that’s the reason why the color scheme is probably different than yours.

However, you don’t have to worry because when we integrate everything we have done with Windows Terminal, you will get the same result that you could see before starting!

Installing Windows Terminal

Installing Windows Terminal does not require much, you just need to have an Microsoft account to be able to download it through the Microsoft Store.

Default Windows Terminal

This is exactly what Windows Terminal looks like by default, but in just a moment, we will integrate it with Cmder to get the best of both worlds!

Setting up Windows Terminal

The first thing we must do is go to the Windows Terminal Settings , where we can see various options. For us, the most important options can be seen below:

"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",



// A profile specifies a command to execute paired with information about how it should look and feel.

// Each one of them will appear in the 'New Tab' dropdown,

// and can be invoked from the commandline with `wt.exe -p xxx`

// To learn more about profiles, visit https://aka.ms/terminal-profile-settings

"profiles": {

"defaults": {

// Put settings here that you want to apply to all profiles.

},

"list": [

{

// Make changes here to the powershell.exe profile.

"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",

"name": "Windows PowerShell",

"commandline": "powershell.exe",

"hidden": false

},

{

// Make changes here to the cmd.exe profile.

"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",

"name": "Command Prompt",

"commandline": "cmd.exe",

"hidden": false

},

{

"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",

"name": "Azure Cloud Shell",

"source": "Windows.Terminal.Azure",

"hidden": false

}

]

},

As you can imagine, a new profile must be created with all the options required to be able to integrate Cmder. Maybe, the most difficult part of all this configuration lies in that value that seems to be unique called guid , and it really is!

How can I generate this value? Well, Windows offers us a very convenient command in Powershell that generates a new GUID value for us:

New-Guid

Generating a new Guid for our custom profile

The value you will get will be completely different from mine. The advantage offered by this command is being able to obtain a truly unique value for our new profile.

Inside list array, we will create a new profile object using the following configuration:

{

"guid": "{6d953325-a939-475d-a151-940cbd0302fb}",

"name": "Cmder",

"commandline": "cmd.exe /k %CMDER_ROOT%\\vendor\\init.bat",

"startingDirectory": "%USERPROFILE%",

"icon": "%CMDER_ROOT%\\icons\\cmder.ico",

"background": "#2e3436",

"padding": "15",

"fontFace": "Cascadia Code",

"fontSize": 10

}

Then we adjust the defaultProfile property with the guid value previously generated for our new profile:

"defaultProfile": "{6d953325-a939-475d-a151-940cbd0302fb}",

Why those options?

guid as mentioned previously, it defines the unique identifier to be used by our profile.

as mentioned previously, it defines the unique identifier to be used by our profile. commandline allows us to start Cmder through the environment variables defined initially, allowing us to configure everything in a rather elegant way.

allows us to start Cmder through the environment variables defined initially, allowing us to configure everything in a rather elegant way. startingDirectory defines the initial directory when starting Windows Terminal.

defines the initial directory when starting Windows Terminal. icon adds a custom icon to the Windows Terminal tab. Cmder offers other icons that are also located in that directory.

adds a custom icon to the Windows Terminal tab. Cmder offers other icons that are also located in that directory. background , padding , fontFace and fontSize allow us to customize the design of our profile in Windows Terminal.

I personally like Fira Code a lot as a typeface, but I must admit that the ligatures that Cascadia Code has are better displayed in Windows Terminal because they occupy the number of original characters replaced by the glyph.

Fira Code ligatures on Windows Terminal

Cascadia Code ligatures on Windows Terminal

In the end, our configuration file should look similar to this:

"defaultProfile": "{6d953325-a939-475d-a151-940cbd0302fb}",



// A profile specifies a command to execute paired with information about how it should look and feel.

// Each one of them will appear in the 'New Tab' dropdown,

// and can be invoked from the commandline with `wt.exe -p xxx`

// To learn more about profiles, visit https://aka.ms/terminal-profile-settings

"profiles": {

"defaults": {

// Put settings here that you want to apply to all profiles.

},

"list": [

{

// Make changes here to the powershell.exe profile.

"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",

"name": "Windows PowerShell",

"commandline": "powershell.exe",

"hidden": false

},

{

// Make changes here to the cmd.exe profile.

"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",

"name": "Command Prompt",

"commandline": "cmd.exe",

"hidden": false

},

{

"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",

"name": "Azure Cloud Shell",

"source": "Windows.Terminal.Azure",

"hidden": false

},

{

"guid": "{6d953325-a939-475d-a151-940cbd0302fb}",

"name": "Cmder",

"commandline": "cmd.exe /k %CMDER_ROOT%\\vendor\\init.bat",

"startingDirectory": "%USERPROFILE%",

"icon": "%CMDER_ROOT%\\icons\\cmder.ico",

"background": "#2e3436",

"padding": "15",

"fontFace": "Cascadia Code",

"fontSize": 10

}

]

},

And this would be the end result in Windows Terminal:

Windows Terminal + Cmder profile as default

Do you like transparency effect?

With just two properties in your profile, you can add the characteristic transparency effect in Windows Terminal, which looks pretty good!

{

...

"useAcrylic": true,

"acrylicOpacity": 0.5

}

This would be the end result:

Windows Terminal with transparency effect

Remember to have transparency effects active in Windows to work properly.

What do we achieve at the end?

Windows Terminal + Cmder is a robust and versatile combination that allows us to have the best of both worlds:

We can use highly functional commands such as ls , cat , grep , git , nano , vim , even ssh natively (forget about using PuTTY) all from Windows.

Additionally, you have full compatibility with the color scheme provided by Windows Terminal, along with fast rendering when scrolling, multiple panels, ease of copying and pasting text, finds with highlight and case match, among other incredible advantages!

References