Windows Terminal + Cmder = ❤️

Wolfgang Dielingen
Jun 3 · 8 min read
Windows Terminal + Cmder = Love
Windows Terminal + Cmder = Love

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 final result (gl)
Windows Terminal final result (gl)
Windows Terminal running gl
Windows Terminal final result (git log)
Windows Terminal final result (git log)
Windows Terminal running git log

What do you need to get started?

  • Download Windows Terminal from Microsoft Store.

Installing Cmder

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
Cmder example directory
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
CMDER_ROOT environment variable
CMDER_ROOT environment variable
ConEmuDir environment variable
ConEmuDir environment variable
ConEmuDir environment variable

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

User’s environment variables
User’s environment variables
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

chcp utf8

It should remain something similar to this:

Cmder Settings, Environment
Cmder Settings, Environment
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
Unicode testing support
Unicode testing support

UTF-8 testing support

cmd /c %ConEmuDir%\ConEmu\Addons\utf-8-test.cmd
UTF-8 testing support
UTF-8 testing support
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

Default Windows Terminal
Default Windows Terminal
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

"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
Generating a new Guid for our custom profile
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?

  • commandline 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.
  • icon 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
Fira Code ligatures on Windows Terminal
Fira Code ligatures on Windows Terminal
Cascadia Code ligatures on Windows Terminal
Cascadia 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
Windows Terminal + Cmder profile as default
Windows Terminal + Cmder profile as default

Do you like transparency effect?

{
...
"useAcrylic": true,
"acrylicOpacity": 0.5
}

This would be the end result:

Windows Terminal with transparency effect
Windows Terminal with transparency effect
Windows Terminal with transparency effect

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

What do we achieve at the end?

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

Talpor

We build fantastic digital products for startups and major brands.Let’s build something big together

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store