How to Turn On or Off the Warning When Closing Multiple Tabs in Windows Terminal

If you use Windows Terminal to run command lines like Command Prompt, PowerShell, or Linux (via WSL), you might notice a warning message when closing the app with several tabs open. This message asks, “Do you want to close all tabs?”

This guide will show you how to turn that warning on or off easily.

What is Windows Terminal?

Windows Terminal is a modern app that lets you use command-line tools like Command Prompt, PowerShell, and Linux Bash on Windows 11. It supports multiple tabs, split views, custom colors, and more.

Why is the Warning Useful?

When you have many tabs open and try to close the terminal, this warning helps you avoid accidentally closing everything and losing your work.


How to Turn the Warning On or Off Using Windows Terminal Settings

  1. Open Windows Terminal:

    Click the Start button, type Terminal, and click the Windows Terminal app to open it.
  2. Go to Settings:

    In the Windows Terminal window, click the down arrow next to the tabs at the top, then click Settings or press Ctrl + ,.
  3. Find the Interaction Tab:

    In the Settings window, select the Interaction tab on the left side.
  4. Toggle the Warning:

    Look for the option “Warn when closing more than one tab” and switch it On to get the warning, or Off to disable it.
  5. Save Changes:

    Click Save at the bottom to apply your changes.


How to Turn the Warning On or Off Using the JSON File

If you prefer, you can also change this setting by editing Windows Terminal’s configuration file (a JSON file):

  1. Open Windows Terminal.
  2. Go to Settings as explained above.
  3. At the bottom left of the Settings window, click Open JSON file.
  4. Look for the line that says "confirmCloseAllTabs":true or "confirmCloseAllTabs":false.
  5. To enable the warning, make sure it says:
    "confirmCloseAllTabs": true,
  6. To disable the warning, change it to:
    "confirmCloseAllTabs": false,
  7. Save the file and close it.


What the Warning Looks Like

When enabled, if you try to close Windows Terminal with multiple tabs open, you will see a warning like this:


Summary

  • Windows Terminal lets you run multiple command-line tabs at once.
  • You can turn on or off a warning message that appears when closing the app with many tabs open.
  • This setting can be changed easily through the app’s Settings or by editing the JSON file.
  • The warning helps prevent accidentally closing all your tabs and losing your work.

For more details, check the official Microsoft documentation:
Windows Terminal Docs

That’s it! Now you know how to control the close warning in Windows Terminal.

Categories:

Tags:

You May Also Like

Leave a Reply

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