How to Enable or Disable Warning when closing Multiple Tabs in Windows Terminal

computer with screen on desk
computer with screen on desk

This article provides instructions on how to enable or disable the warning message when closing multiple tabs in Windows Terminal. The process involves either accessing ‘Settings’ and adjusting the ‘Warn when closing more than one tab’ option or manually adding a specific line to the Terminal app’s built-in JSON configuration file.

This article explains how to turn on or off warning when closing more than one tab in Windows Terminal.

Windows Terminal is a modern host application for the command-line shells, including Command PromptWindows PowerShell, and bash (via Windows Subsystem for Linux (WSL)).

Unlike the previous shell apps in Windows, Windows Terminal has many features, including multiple tabs, panes, Unicode and UTF-8 character support, a GPU-accelerated text rendering engine, and themes customization with text, colors, backgrounds, and shortcuts.

When you close Windows Terminal with more than one tab open, you will get a warning message “Do you want to close all tabs?“.

This is the default behavior. However, if you are not getting the prompt when closing Windows Terminal with multiple tabs open, here’s how to enable or disable it.

Turn on or off warning when closing Windows Terminal with multiple tabs

As described above, you will be alerted when you close Windows Terminal with more than one tab open by default.

If you are not getting a warning, here’s how to turn it on or off if you don’t want it enabled.

First, open the Windows Terminal app.

You can do that by clicking on the Start menu and searching for Terminal. Then, under Best match, select and open the Windows Terminal app.

windows 11 open terminal app
windows 11 open the terminal app

When the Terminal app opens, click the down arrow button on the top bar, and select Settings (Ctrl +,).

Windows Terminal Settings button updated
Windows Terminal Settings button updated

On the Settings window, click on the Interaction tab. Then select the tile “Warn when closing more than one tab,” and toggle the button to the On position to enable the Terminal app to warn you when closing with multiple tabs.

To disable it, toggle the button back to the Off position.

Windows Terminal warn when closing more than one tab
Windows Terminal warns when closing more than one tab.

Click on the Save button to save your changes and exit.

Turn on or off warning when closing the Terminal app with multiple tabs using JSON file

Another way you can enable or disable this feature in the Terminal app is to use its built-in JSON configuration file.

Select the Open JSON file button on the bottom left.

Windows Terminal open json file
Windows Terminal opens JSON file

When the file opens, location the highlighted section.

Windows Terminal open json file configuration section
Windows Terminal opens the JSON file configuration section

To disable the warning, add the line below to the exact area of the configuration file.

Disable:

"confirmCloseAllTabs":false,

Add the line at the exact location in the file and save.

    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    "confirmCloseAllTabs":false,
    "profiles":

Enable:

"confirmCloseAllTabs":true,

Add the line to the exact location in the configuration file.

    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    "confirmCloseAllTabs":true,
    "profiles":

Save the JSON configuration file to apply your changes.

Below is an example of the Windows Terminal app with a warning window.

Windows Terminal with warning window
Windows Terminal with a warning window

That should do it!

Reference:

https://learn.microsoft.com/en-us/windows/terminal/

Conclusion:

This post showed you how to enable or disable “Warn when closing with more than one tab” in the Windows Terminal app. If you find any errors above or have something to add, please use the comment form below.

Posted by
Richard

I love computers; maybe way too much. What I learned I try to share at geekrewind.com.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.