Tutorial: Configure tab titles in Windows Terminal
By default, the tab title is set to the shell's title. If a tab is composed of multiple panes, the tab's title is set to that of the currently focused pane. If you want to customize what is set as the tab title, follow this tutorial.
In this tutorial, you learn how to:
- Use the
- Set the shell's title
- Using the
tabTitle setting allows you to define the starting title for a new instance of a shell. If it is not set, the profile
name is used instead. Each shell responds to this setting differently.
|PowerShell||The title is set.|
|Command Prompt||The title is set. If a command is running, it is temporarily appended to the end of the title.|
|Ubuntu||The title is ignored, and instead set to
|Debian||The title is set.|
Though Ubuntu and Debian both run bash, they have different behaviors. This is to show that different distributions may have different behaviors.
Set the shell's title
A shell has full control over its own title. However, each shell sets its title differently.
Note that some Linux distributions (i.e. Ubuntu) set their title automatically as you interact with the shell. If the above command doesn't work, run the following command:
PS1=$ PROMPT_COMMAND= echo -ne "\033]0;New Title\a"
This will change the title to 'New Title', and also set the prompt to '$'.
Since a shell has control over its title, it may choose to overwrite the tab title at any time. For example, the
posh-git module for PowerShell adds information about your Git repository to the title.
Windows Terminal allows you to suppress changes to the title by setting
true in your profile. This makes new instances of the profile set your visible title to
tabTitle is not set, the visible title is set to the profile's
Note that this decouples the shell's title from the visible title presented on the tab. If you read the shell's variable where the title is set, it may differ from the tab's title.