4 ms·
cmd and powershell are "console programs". They launch conhost.exe which is the text window you are interacting with. Another "console program" for example is h
by chokolad 7y ago
cmd and powershell are "console programs". They launch conhost.exe which is the text window you are interacting with. Another "console program" for example is https://en.wikipedia.org/wiki/Far_Manager https://en.wikipedia.org/wiki/Far_Manager. Or you can write your own.
When Windows is asked to run console program, it spawns conhost.exe and the console program is putting the text inside conhost's window. That was architecture since Windows NT time.
In Windows 10 timeframe there was an attempt to modernize conhost.exe and minor changes were made but ultimately the new approach was chosen.
Windows Terminal is the result of that approach. It's essentially new conhost.exe (more complicated than that, but good enough for this one) and it provides the text window for all the console programs such as cmd, powershell, Far, ssh etc. to run
Now let's get to wsl/ubuntu.
WSL - windows subsystem for linux. It allows Windows to run unmodified linux binaries. for example you can run Ubuntu on it. Or RedHat. Or CentOS, or Kali or a few other Linux distributions. Main way linux programs interact with the world is usually a text window (terminal) so originally conhost.exe was used for that. Now you can use Windows Terminal for this.
Think of Windows Terminal and conhost as "window" for text programs.