MSDN Documentation

Understanding and Managing Windows Terminal Profiles

Windows Terminal offers a powerful and highly customizable experience for command-line users. A key feature that enables this customization is the concept of profiles. Profiles allow you to define specific settings for different shells or command-line applications you use, such as PowerShell, Command Prompt, or even WSL distributions.

What is a Profile?

Each profile in Windows Terminal represents a distinct environment. This includes settings like:

Default Profiles

When you first install Windows Terminal, it automatically creates default profiles for common shells like:

These can be accessed by clicking the dropdown arrow next to the '+' button in the terminal's tab bar.

Creating and Editing Profiles

The easiest way to manage your profiles is through the Windows Terminal Settings UI. To access it:

  1. Open Windows Terminal.
  2. Click the dropdown arrow next to the new tab (+) button.
  3. Select Settings.
Windows Terminal Settings UI
The Windows Terminal Settings UI provides a user-friendly interface for profile management.

Within the Settings UI, you'll see a list of your current profiles on the left-hand side. You can click on an existing profile to edit its properties, or click the + Add new profile button to create a new one.

Profile Settings Explained:

Important: For WSL distributions, ensure you have installed the desired distribution from the Microsoft Store before attempting to create a profile for it.

Advanced Configuration (JSON File)

While the Settings UI is convenient, advanced users can directly edit the settings.json file for granular control. To open this file:

  1. Open Windows Terminal Settings.
  2. Click the Open JSON file button at the bottom left.

The settings.json file is structured with global settings and a list of profiles. Each profile is an object within the profiles.list array.


{
    "globals": {
        "defaultProfile": "{guid-of-your-default-profile}"
    },
    "profiles": {
        "list": [
            {
                "guid": "{guid-of-powershell}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false
            },
            {
                "guid": "{guid-of-wsl}",
                "name": "Ubuntu",
                "commandline": "wsl.exe -d Ubuntu",
                "hidden": false,
                "startingDirectory": "//wsl$/Ubuntu/home/"
            }
            // ... other profiles
        ]
    }
    // ... other global settings
}

            
Tip: Every profile has a unique GUID. You can find or generate GUIDs using tools like PowerShell's [guid]::NewGuid(). The Settings UI automatically manages these GUIDs for you.

Common Profile Customizations

Color Schemes

Windows Terminal supports custom color schemes. You can define them in the schemes array within your settings.json file and then assign them to a specific profile's colorScheme property.


"schemes": [
    {
        "name": "Solarized Dark",
        "background": "#073642",
        "black": "#073642",
        "blue": "#268bd2",
        "cyan": "#859900",
        "foreground": "#839496",
        "green": "#800080",
        "purple": "#6c71c4",
        "red": "#dc322f",
        "white": "#93a1a1",
        "yellow": "#b58900",
        "brightBlack": "#002b36",
        "brightBlue": "#839496",
        "brightCyan": "#657b83",
        "brightForeground": "#657b83",
        "brightGreen": "#93a1a1",
        "brightPurple": "#2aa198",
        "brightRed": "#cb4b16",
        "brightWhite": "#ffff00",
        "brightYellow": "#fdf6e3"
    }
]

            

Customizing Font

To change the font for a profile:


{
    // ... other profile settings
    "font": {
        "face": "Cascadia Code PL",
        "size": 10,
        "weight": "normal"
    }
    // ...
}

            

Conclusion

Mastering Windows Terminal profiles is essential for optimizing your command-line workflow. Whether you prefer the intuitive Settings UI or the power of direct JSON editing, you can tailor each environment to your specific needs, making your interaction with the terminal more efficient and enjoyable.