Terminal > Windows and Tabs
Tabs
# Tabs import { Tabs, TabItem } from '@astrojs/starlight/components'; import VideoEmbed from '@components/VideoEmbed.astro'; :::note New Tabs will default to the active Tabs’ current [Working Directory](/terminal/more-features/working-directory/) and the actual color values will be automatically derived from your Warp [Theme](/terminal/appearance/themes/). ::: ## How to use Tabs <Tabs> <TabItem label="macOS"> * Right-click on the new Tab button `+` to make a new tab, restore closed tab, or run a saved [Launch Configuration](/terminal/sessions/launch-configurations/). * Open a new Tab with `CMD-T` or by clicking on the `+` in the top bar. * Close the current Tab with `CMD-W` or by clicking on the `X` on hover over a Tab. * Reopen closed tabs with `SHIFT-CMD-T`. * Move a Tab to the Left / Right with `CTRL-SHIFT-LEFT` / `CTRL-SHIFT-RIGHT` or by clicking and dragging a Tab. * Activate the Previous / Next Tab with `SHIFT-CMD-{` / `SHIFT-CMD-}` or by clicking a Tab. * Activate the first through eighth Tabs with `CMD-1` thru `CMD-8`. * Switch to the last Tab with `CMD-9`. * Double-click a Tab to rename it. * Right-clicking on a Tab reveals more options you can explore within the [Command Palette](/terminal/command-palette/) or [Keyboard Shortcuts](/getting-started/keyboard-shortcuts/#fundamentals). </TabItem> <TabItem label="Windows"> * Right-click on the new Tab button `+` to make a new tab, restore closed tab, or run a saved [Launch Configuration](/terminal/sessions/launch-configurations/). * Open a new Tab with `CTRL-SHIFT-T` or by clicking on the `+` in the top bar. * Close the current Tab with `CTRL-SHIFT-W` or by clicking on the `x` on hover over a Tab. * Reopen closed tabs with `CTRL-ALT-T`. * Move a Tab to the Left / Right with `CTRL-SHIFT-LEFT` / `CTRL-SHIFT-RIGHT` or by clicking and dragging a Tab. * Activate the Previous / Next Tab with `CTRL-PGUP` / `CTRL-PGDN` or by clicking a Tab. * Activate the first through eighth Tabs with `CTRL-1` thru `CTRL-8`. * Switch to the last Tab with `CTRL-9`. * Double-click a Tab to rename it. * Right-clicking on a Tab reveals more options you can explore within the [Command Palette](/terminal/command-palette/) or [Keyboard Shortcuts](/getting-started/keyboard-shortcuts/#fundamentals). </TabItem> <TabItem label="Linux"> * Right-click on the new Tab button `+` to make a new tab, restore closed tab, or run a saved [Launch Configuration](/terminal/sessions/launch-configurations/). * Open a new Tab with `CTRL-SHIFT-T` or by clicking on the `+` in the top bar. * Close the current Tab with `CTRL-SHIFT-W` or by clicking on the `x` on hover over a Tab. * Reopen closed tabs with `CTRL-ALT-T`. * Move a Tab to the Left / Right with `CTRL-SHIFT-LEFT` / `CTRL-SHIFT-RIGHT` or by clicking and dragging a Tab. * Activate the Previous / Next Tab with `CTRL-PGUP` / `CTRL-PGDN` or by clicking a Tab. * Activate the first through eighth Tabs with `CTRL-1` thru `CTRL-8`. * Switch to the last Tab with `CTRL-9`. * Double-click a Tab to rename it. * Right-clicking on a Tab reveals more options you can explore within the [Command Palette](/terminal/command-palette/) or [Keyboard Shortcuts](/getting-started/keyboard-shortcuts/#fundamentals). </TabItem> </Tabs> :::tip **Terminal Tip**\ Using your `.zshrc` or `.bashrc` files on macOS or Linux, you can set a new Tab name: ```bash # Set name, where MyTabName would be whatever you want to see in the Tab ( either a fixed string, $PWD, or something else ) function set_name () { export WARP_DISABLE_AUTO_TITLE=true echo -ne "\033]0;MyTabName\007" } # Add the function to the environment variable in either Zsh or Bash if [ -n "$ZSH_VERSION" ]; then preexec_functions+=(set_name) elif [ -n "$BASH_VERSION" ]; then PROMPT_COMMAND='set_name' fi ``` Learn more about [setting shell tab titles in Windows Terminal](https://learn.microsoft.com/en-us/windows/terminal/tutorials/tab-title#set-the-shells-title). ::: ### Tab Restoration Tab Restoration enables you to reopen recently closed tabs for up to 60 seconds. Configure this feature in **Settings** > **Features** > **Session** > **Enable reopening of closed sessions**. ### CTRL-TAB behavior `CTRL-TAB` shortcut defaults to activate the previous / next Tab. You can configure the shortcut to cycle the most recent session, including any [Split Panes](/terminal/windows/split-panes/), in **Settings** > **Features** > **Keys** > **Ctrl-Tab behavior**. ### Tabs behavior Please see our [Appearance > Tabs Behavior](/terminal/appearance/tabs-behavior/) docs for more Tab related settings. ### How Tabs work <VideoEmbed url="https://www.loom.com/share/84d15cc7eb5a4a668bb86be9e827f261?hide_owner=true&hide_share=true&hide_title=true&hideEmbedTopBar=true" title="Tabs Demo" /> ## Tab groups Organize related tabs into named, collapsible groups. A tab group keeps its member tabs together in the tab bar, can be given a name and a color, and can be collapsed to hide its members until you need them. Tab groups work in both the horizontal tab bar and the [vertical tabs](/terminal/windows/vertical-tabs/) panel. ### Create a group * Right-click a tab and choose **New group with tab** to start a group from that tab. * Select multiple tabs first (see [Select multiple tabs](#select-multiple-tabs)), then right-click the selection to group them together. * Click the **+** new-tab button and choose **New tab group** to create a new group with a new tab. ### Select multiple tabs * `Cmd`-click (macOS) or `Ctrl`-click (Windows/Linux) a tab to add it to or remove it from the selection. * `Shift`-click a tab to select every tab between it and the active tab. With multiple tabs selected, right-click to group them, move them into an existing group, or remove them from their group in one step. :::note The active tab is always included in a selection. ::: ### Manage a group Right-click a group's header to: * **Rename** the group. * Set a **color** for the group. * Add a **New tab in group**. * **Ungroup tabs** to dissolve the group while keeping its tabs. * Close the tabs in the group. Right-click an individual tab for **New group with tab**, **Move to group** (to move it into another group), and **Remove from group**. ### Collapse a group Click a group's header to collapse or expand it. Collapsed groups hide their member tabs to save space in the tab bar; click the header again to expand. :::note You can assign keyboard shortcuts for creating a group from the active or selected tabs and for removing tabs from a group in **Settings** > **Keyboard shortcuts**. ::: ## Pinned tabs Pin the tabs and tab groups you rely on so they stay at the front of the tab bar and are protected from reordering. A pinned tab keeps its position when you open, close, move, or drag other tabs, which keeps your most important sessions in a predictable spot. Pinning works in both the horizontal tab bar and the [vertical tabs](/terminal/windows/vertical-tabs/) panel. ### Pin or unpin a tab * Right-click a tab and choose **Pin tab**. The tab moves to the front of the tab bar and stays there. * Right-click a pinned tab and choose **Unpin tab** to unpin it. The tab moves back to the start of the unpinned tabs. Pinning a tab that belongs to a [group](#tab-groups) removes it from the group first, because pinning a tab and pinning a group are independent. ### Pin or unpin a tab group * Right-click a [tab group's](#tab-groups) header and choose **Pin group**. The group keeps its member tabs together and moves to the front of the tab bar. * Right-click a pinned group's header and choose **Unpin group** to unpin it. ### Keyboard shortcuts Pinning actions ship without default keyboard shortcuts. Assign your own in **Settings** > **Keyboard shortcuts** for **Pin current tab**, **Unpin current tab**, **Pin current tab group**, and **Unpin current tab group**. ## Move a tab to another window You can pull a tab out of the tab bar to reorganize your windows, similar to a web browser: * **Detach a tab into its own window** — drag a tab out of the tab bar and drop it in empty space to open it in a new window. * **Move a tab between windows** — drag a tab onto another window's tab bar to move it there. The tab keeps its running session, panes, and state as it moves. This works from both the horizontal tab bar and the [vertical tabs](/terminal/windows/vertical-tabs/) panel. :::note Dragging tabs between windows is available on macOS and Windows. :::Organize your window into multiple terminal sessions with customizable tabs, complete with titles and ANSI colors.
How to use Tabs
Section titled “How to use Tabs”- Right-click on the new Tab button
+to make a new tab, restore closed tab, or run a saved Launch Configuration. - Open a new Tab with
CMD-Tor by clicking on the+in the top bar. - Close the current Tab with
CMD-Wor by clicking on theXon hover over a Tab. - Reopen closed tabs with
SHIFT-CMD-T. - Move a Tab to the Left / Right with
CTRL-SHIFT-LEFT/CTRL-SHIFT-RIGHTor by clicking and dragging a Tab. - Activate the Previous / Next Tab with
SHIFT-CMD-{/SHIFT-CMD-}or by clicking a Tab. - Activate the first through eighth Tabs with
CMD-1thruCMD-8. - Switch to the last Tab with
CMD-9. - Double-click a Tab to rename it.
- Right-clicking on a Tab reveals more options you can explore within the Command Palette or Keyboard Shortcuts.
- Right-click on the new Tab button
+to make a new tab, restore closed tab, or run a saved Launch Configuration. - Open a new Tab with
CTRL-SHIFT-Tor by clicking on the+in the top bar. - Close the current Tab with
CTRL-SHIFT-Wor by clicking on thexon hover over a Tab. - Reopen closed tabs with
CTRL-ALT-T. - Move a Tab to the Left / Right with
CTRL-SHIFT-LEFT/CTRL-SHIFT-RIGHTor by clicking and dragging a Tab. - Activate the Previous / Next Tab with
CTRL-PGUP/CTRL-PGDNor by clicking a Tab. - Activate the first through eighth Tabs with
CTRL-1thruCTRL-8. - Switch to the last Tab with
CTRL-9. - Double-click a Tab to rename it.
- Right-clicking on a Tab reveals more options you can explore within the Command Palette or Keyboard Shortcuts.
- Right-click on the new Tab button
+to make a new tab, restore closed tab, or run a saved Launch Configuration. - Open a new Tab with
CTRL-SHIFT-Tor by clicking on the+in the top bar. - Close the current Tab with
CTRL-SHIFT-Wor by clicking on thexon hover over a Tab. - Reopen closed tabs with
CTRL-ALT-T. - Move a Tab to the Left / Right with
CTRL-SHIFT-LEFT/CTRL-SHIFT-RIGHTor by clicking and dragging a Tab. - Activate the Previous / Next Tab with
CTRL-PGUP/CTRL-PGDNor by clicking a Tab. - Activate the first through eighth Tabs with
CTRL-1thruCTRL-8. - Switch to the last Tab with
CTRL-9. - Double-click a Tab to rename it.
- Right-clicking on a Tab reveals more options you can explore within the Command Palette or Keyboard Shortcuts.
Tab Restoration
Section titled “Tab Restoration”Tab Restoration enables you to reopen recently closed tabs for up to 60 seconds. Configure this feature in Settings > Features > Session > Enable reopening of closed sessions.
CTRL-TAB behavior
Section titled “CTRL-TAB behavior”CTRL-TAB shortcut defaults to activate the previous / next Tab. You can configure the shortcut to cycle the most recent session, including any Split Panes, in Settings > Features > Keys > Ctrl-Tab behavior.
Tabs behavior
Section titled “Tabs behavior”Please see our Appearance > Tabs Behavior docs for more Tab related settings.
How Tabs work
Section titled “How Tabs work”Tab groups
Section titled “Tab groups”Organize related tabs into named, collapsible groups. A tab group keeps its member tabs together in the tab bar, can be given a name and a color, and can be collapsed to hide its members until you need them. Tab groups work in both the horizontal tab bar and the vertical tabs panel.
Create a group
Section titled “Create a group”- Right-click a tab and choose New group with tab to start a group from that tab.
- Select multiple tabs first (see Select multiple tabs), then right-click the selection to group them together.
- Click the + new-tab button and choose New tab group to create a new group with a new tab.
Select multiple tabs
Section titled “Select multiple tabs”Cmd-click (macOS) orCtrl-click (Windows/Linux) a tab to add it to or remove it from the selection.Shift-click a tab to select every tab between it and the active tab.
With multiple tabs selected, right-click to group them, move them into an existing group, or remove them from their group in one step.
Manage a group
Section titled “Manage a group”Right-click a group's header to:
- Rename the group.
- Set a color for the group.
- Add a New tab in group.
- Ungroup tabs to dissolve the group while keeping its tabs.
- Close the tabs in the group.
Right-click an individual tab for New group with tab, Move to group (to move it into another group), and Remove from group.
Collapse a group
Section titled “Collapse a group”Click a group's header to collapse or expand it. Collapsed groups hide their member tabs to save space in the tab bar; click the header again to expand.
Pinned tabs
Section titled “Pinned tabs”Pin the tabs and tab groups you rely on so they stay at the front of the tab bar and are protected from reordering. A pinned tab keeps its position when you open, close, move, or drag other tabs, which keeps your most important sessions in a predictable spot. Pinning works in both the horizontal tab bar and the vertical tabs panel.
Pin or unpin a tab
Section titled “Pin or unpin a tab”- Right-click a tab and choose Pin tab. The tab moves to the front of the tab bar and stays there.
- Right-click a pinned tab and choose Unpin tab to unpin it. The tab moves back to the start of the unpinned tabs.
Pinning a tab that belongs to a group removes it from the group first, because pinning a tab and pinning a group are independent.
Pin or unpin a tab group
Section titled “Pin or unpin a tab group”- Right-click a tab group's header and choose Pin group. The group keeps its member tabs together and moves to the front of the tab bar.
- Right-click a pinned group's header and choose Unpin group to unpin it.
Keyboard shortcuts
Section titled “Keyboard shortcuts”Pinning actions ship without default keyboard shortcuts. Assign your own in Settings > Keyboard shortcuts for Pin current tab, Unpin current tab, Pin current tab group, and Unpin current tab group.
Move a tab to another window
Section titled “Move a tab to another window”You can pull a tab out of the tab bar to reorganize your windows, similar to a web browser:
- Detach a tab into its own window — drag a tab out of the tab bar and drop it in empty space to open it in a new window.
- Move a tab between windows — drag a tab onto another window's tab bar to move it there.
The tab keeps its running session, panes, and state as it moves. This works from both the horizontal tab bar and the vertical tabs panel.