Windows Terminal becomes new default command line tool in Windows 11
Windows users have quite a few options when it comes to using the command line. There is the classic Command Prompt for one, and PowerShell. Now, with the release of Windows 11 version 22H2, comes a new default: Windows Terminal.
Windows Terminal was launched in 2019 by Microsoft as an open source application. It took Microsoft a year to release Windows Terminal 1.0 to the public, and another two years to make it the default on Windows 11.
Windows Terminal brings command line interfaces together in a single interface. Since it is tab-based, it is possible to launch multiple command lines at the same time. Want three PowerShell prompts, or a Command Prompt and a PowerShell prompt? Terminal can do that in a single window.
It is also coming with customization options to change the look and feel of each individual tab. Called Profiles by Microsoft, each is associated with a specific command line application. Besides CMD and PowerShell, Windows Terminal may also provide access to Windows Subsystem for Linux or Visual Studio, among others.
Terminal supports several other features. Panes needs to be mentioned specifically, as it can display multiple prompts in a single tab. There is also a command palette, which users may display with the shortcut CTRL-Shift-P.
Configuring Windows Terminal
Most Windows 11 users may not mind that Windows Terminal is opened when they launch another command prompt application on the system. These are launched in a tab in the Windows Terminal window, and the added customization options make Terminal a good choice for many tasks.
Microsoft has added an option to restore the pre-Windows 11 version 22H2 behavior however. Here is how that is configured:
- Select Start and then Settings, or use the keyboard shortcut Windows-I to open the Settings app.
- Go to Privacy & Security > For developers.
- Locate the Terminal entry on the page that opens and activate the menu. The following options are provided:
- Let Windows decide -- Opens Windows Terminal in Windows 11 version 22H2.
- Windows console host - Opens a dedicated window for the selected command prompt interface, .e.g, a PowerShell window when launching PowerShell.
- Windows Terminal -- Same as "Let Windows decide". Opens Windows Terminal whenever a command prompt window is launched.
Now You: which do you prefer: Terminal or a specific command line application?
Don’t use terminal a lot so I am a bit confused as to why Windows needs so many options to access a terminal?
Terminal allows to use Powershell native, Poweshell 7.2, CMD and more.
I have a lot of .cmd scripts I run. Is terminal 100% compatible with the command prompt?
You select the environment for each tab in the terminal, be it cmd, PowerShell, WSL, Python, etc.. so yes, it is 100% compatible with the command prompt. You can also set the default.
“…which do you prefer: Terminal or a specific command line application?”
I prefer to use Visual Studio Code, with the PowerShell Extension for Visual Studio Code installed. This allows writing PowerShell in the Visual Studio Code editor window (which has syntax highlighting, tab completion, etc.) and then run it in the built-in Visual Studio Code terminal using F5 or F8 shortcut keys (like when using the legacy PowerShell ISE). Then save the PowerShell code to file as .ps1 files to open and use again in Visual Studio Code in the future.
Visual Studio Code:
PowerShell Extension for VSCode:
I’m in disbelief that they gave us this freedom. That’s unusual for Microsoft.