Windows Terminal for Developers: The Ultimate Customization Guide
For a long time, the default Windows command prompt (cmd.exe) and PowerShell consoles were quite basic, lacking many of the features we've come to expect from modern terminals on other operating systems. Windows Terminal changes all of that by providing a modern, customizable, and powerful command-line experience.
Here’s why it's so useful for us
Tabs and Panes
You can open multiple command-line interfaces (like PowerShell, Command Prompt, Git Bash, or even the Windows Subsystem for Linux—WSL) in a single window using tabs. You can also split the window into multiple panes to work on different things at once. This eliminates the need to constantly switch between different windows.
Customization
You can customize nearly every aspect of the terminal, from the color schemes and fonts to the background images and transparency. This allows you to create an environment that's comfortable and visually appealing, reducing eye strain and boosting your productivity.
Performance
It's built with a modern GPU-accelerated text rendering engine, making it faster and smoother than the older console host, especially when dealing with large amounts of text or animations.
Rich Text and Unicode Support
It properly handles Unicode characters, which is crucial when working with international projects or simply displaying emoji. It also supports rich text, which means you can have bold, italic, and colored text.
Integration with Development Tools
It integrates seamlessly with WSL, allowing you to run your favorite Linux commands and tools directly on Windows. This is a huge win for anyone doing cross-platform development or using Linux-based tools.
Getting Windows Terminal is super straightforward.
Open the Microsoft Store on your Windows machine.
Search for "Windows Terminal".
Click "Get" or "Install".
That's it! The Microsoft Store will handle the rest, including keeping it updated automatically.
The real power of Windows Terminal lies in its configuration file, settings.json. You can access it by opening the terminal and pressing Ctrl + , or by clicking the small down arrow next to the new tab button and selecting "Settings".
Let's look at a sample of how to customize your setup.
{
// The list of profiles that appear in the dropdown menu.
"profiles": {
"list": [
{
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a492a83}",
"name": "PowerShell",
"commandline": "powershell.exe",
"hidden": false,
"colorScheme": "Dracula",
"font": {
"face": "Fira Code",
"size": 12
},
"startingDirectory": "%USERPROFILE%\\Documents\\dev"
},
{
"guid": "{07b52e3e-de2c-5db4-aa2e-43b95a62f854}",
"name": "Ubuntu-22.04",
"source": "Microsoft.PowerShell.Core",
"hidden": false,
"colorScheme": "One Half Dark"
},
{
"guid": "{61c54bbd-c2c6-5271-96e7-009d87a71",
"name": "Azure Cloud Shell",
"source": "Microsoft.Azure.CloudShell"
}
]
},
// Global settings and key bindings
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a492a83}",
"theme": "dark",
"initialCols": 120,
"initialRows": 30,
"keybindings": [
{ "command": { "action": "splitPane", "split": "vertical" }, "keys": "alt+shift+d" },
{ "command": "closePane", "keys": "ctrl+w" }
]
}
profiles
This section defines the different command-line environments you can open. Each profile has a unique guid and a name.
"PowerShell"
This is a profile for PowerShell. Notice how we're setting a specific colorScheme ("Dracula") and a custom font ("Fira Code"). We've also set a startingDirectory so that whenever you open this profile, it automatically starts in your development folder.
"Ubuntu-22.04"
This profile is for a specific WSL distribution. It shows how easily you can integrate your Linux environments.
defaultProfile
This setting determines which profile opens automatically when you launch the terminal. In this example, it's set to PowerShell.
keybindings
This is where you can define your own keyboard shortcuts.
"splitPane"
This command, bound to alt+shift+d, creates a new pane, which is incredibly useful for multitasking.
"closePane"
This command, bound to ctrl+w, closes the current pane.
By customizing your settings.json file, you can build a highly efficient and personalized command-line environment tailored to your specific needs as a software engineer.