Search code examples
visual-studio-codeterminalbatch-processingkill

How to quickly close all open terminals in VS Code?


How to quickly close all open terminals in VS Code?

I have a lot of opened terminals and I could go over them one by one and kill each one of them separately. Or I could select a few of them and then kill the selected batch. But both approaches are not convenient, since they require a lot of time. I have at least 10000 open terminals, while in one batch I can select a few hundreds.

Is there a way to kill all terminals at once?

enter image description here


Solution

  • There is a Terminal: Kill All Terminals command, not bound to anything by default.

    You could make a keybinding for it like (in your keybindings.json):

    {
      "key": "ctrl+alt+k",           // whatever you want here
      "command": "workbench.action.terminal.killAll"
    }
    

    Or search for the command in your Keyboard Shortcuts page and click on the pencil icon to enter some keybinding.

                             Or
    

    View->Command Palette-> type "kill all terminal"

                             Or
    

    ctrl+shift+p then type "kill all terminal"

    Command Palette: Kill All Terminals