Those who spend a lot of time using Windows from the command line have probably noticed that Windows has several different command-line environments. The Windows command prompt and PowerShell are probably the most familiar, but there are other command-line environments. For example, there is the Bash shell and Azure Cloud Shell. There are also third-party command-line environments such as AWS CLI (which builds on PowerShell). Fortunately, Microsoft has built a tool into Windows 11 that you can use to help organize these various command-line environments and make them more easily accessible. The tool is called Windows Terminal, which Microsoft introduced a few years ago but will be even more prominent in Windows 11.
It looks like PowerShell — but it’s not
When you launch the Windows Terminal, it initially appears to be a standard PowerShell window, as shown in the image below. However, there is more to Windows Terminal than initially meets the eye.
As you look at the image above, you will notice that the Windows Terminal window is tabbed, much like a web browser. If you click the Plus icon, for example, you can open another tab, which will give you two independent PowerShell sessions in two separate tabs. These truly are separate sessions. If you declare a variable on one tab, for instance, the variable is not valid within another tab.
Open multiple Windows command-line environments
As you have probably already guessed, the Windows Terminal is not limited solely to using PowerShell. You can use the Windows Terminal to access a variety of command prompt environments. You can have multiple command lines open at the same time, each on its own tab. To open a non-PowerShell tab, just click on the down arrow icon that appears just to the right of the selected tab in the image above. This will cause Windows Terminal to display a list of the command-line environments that you can open. Just click on your environment of choice to open it.
As is the case with a browser, it’s easy to end up with a lot of tabs open at the same time. However, Windows Terminal can help you to keep your open tabs organized. When you right-click on a tab, you are presented with a menu that allows you to rename the tab and change the tab’s color. Additionally, this menu provides options for closing the current tab, closing all of the other tabs, and duplicating the tab. Incidentally, duplicating a tab does not duplicate the tab’s contents (such as variables that have been declared).
As previously noted, the current Windows 11 build supports PowerShell, the Windows command prompt, and Azure Cloud Shell. However, Windows Terminal is extensible, and it is relatively easy to add other command-line environments if you have the need.
To add a new environment to Windows Terminal, click the down arrow icon as though you were going to be creating a new tab. But rather than picking a command-line environment, choose the Settings option (which you can see in one of the earlier screen captures). As you can see in the next image, the Settings page gives you the opportunity to choose which command-line environment is used by default. If, for example, you use the Windows command prompt more often than you use PowerShell, you could change the default profile to the command prompt. By doing so, Windows Terminal would open into a command prompt environment. New tabs would also open to the Windows command prompt unless you chose a different profile.
As I’m sure you noticed in the screen capture above, you also can control the launch mode, the behavior of new instances, and even the number of columns to display. However, if you look at the left side of the screen capture, you will notice a series of tabs. All of these tabs pertain to Windows Terminal, and one of the options is to add a new profile.
When you click on the Add a New Profile tab, Windows Terminal will give you an option to duplicate any of the existing profiles. However, this screen also contains a button that you can click to create a new empty profile. Clicking on this button takes you to the screen shown below.
As you can see in the image, you can provide a name for the new profile and you also can select the command line that you want to run, as well as the starting directory that you want to use. You can even choose the icon that you want to use. Hence, if your PC contained a Linux command-line environment or something similar, you could create a profile for that environment, meaning that you could create Linux tabs alongside PowerShell and Windows command prompt tabs.
One last thing that I want to mention about Windows Terminal is that you can customize the look and feel of both custom profiles and native profiles. If you look back at the screen that allows you to create a new profile, you will notice a Profiles section that lists all existing profiles. Clicking on any of these profiles causes Windows to expose the profile settings. As you can see in the following image, you can customize the font and color scheme associated with a profile.
Windows Terminal and Windows 11: A winning combination
Once Windows 11 is released, the Windows Terminal is sure to become one of my new favorite tools. I often have five or six PowerShell Windows open at the same time, and juggling all those windows is sometimes challenging. I love the idea of having tabbed sessions and giving each tab a name that reflects what it is that I am doing within that tab at the given moment.
Featured image: Shutterstock
More Windows 11 articles
- Preparing your virtual machines for Windows 11 using PowerShell
- Windows 11 requirements update: Some clarity, more confusion
- Making Hyper-V work in the Windows 11 preview
- Get this free tool for evaluating Windows 11 application compatibility
- Digging deeper into Windows 11: The good, the questionable — and why?