Is there a way to replace cmd window with the new windows terminal?

Now that we have the new Windows Terminal, I never want to see the cmd.exe window again on my dev machine - is there any way I can make it replace it across the whole OS, just like in ConEmu and Cmder?

Update: I understand cmd.exe will never go away and I am not asking how to remove cmd.exe from Windows, what I would like to know is whether there is a way to redirect all input/output from cmd.exe to the Windows Terminal so that when I double-click a batch file or PowerShell script, it's output will open in a new tab within Windows Terminal (if I understand it right, this is also what ConEmu and Cmder do).


Solution 1:

cmd.exe doesn't have a window. cmd.exe is just a console application. The window you usually see when you start cmd.exe has nothing to do with cmd.exe, because it's a console window drawn by a part of Windows kernel called conhost.exe. You can replace cmd.exe with whatever you want, it still won't change the console window. The console window is automatically allocated by the kernel whenever the system starts any console process.

Your only option is to use ConEmu, which intercepts conhost.exe and automatically hides the allocated console.

Solution 2:

In Windows 11, you can choose the default terminal app to host the user interface for command-line applications.

  1. Open the settings by pressing the windows key + i
  2. Click on Privacy & security
  3. Click on For developers
  4. Scroll down until you see Terminal
  5. From the dropdown now select Windows Terminal in favour of Windows Console Host

Even if you run a command like cmd in the future, it will bring up the Windows Terminal instead.

Perhaps this helps someone in the future.

Solution 3:

What you probably want is to replace conhost.exe, which is the host window for any console in windows systems.

To do this is really simple, just follow these instructions:

https://github.com/microsoft/terminal/issues/1817