Closing Terminal Windows Instantly

I switch between development projects quite frequently — usually at least five or ten times a day. Most of them require an ongoing process like a web server or a watch-and-build script, so I almost always have a process running in my Terminal.

Terminal’s behaviour when closing a window or tab with a running process is to ask first. This is perfect for a default, but since I rarely run anything that matters if it gets killed, I’d rather just be able to hit cmd-w or cmd-q without any hold-ups.

Terminal’s modal confirmation, shown when closing a window or tab with a running process.
Terminal’s modal confirmation, shown when closing a window or tab with a running process.

To skip the confirmation:

  • Open Terminal’s preferences
  • Choose Profiles from the toolbar
  • Choose Shell from the tab bar below
  • Change the Ask before closing option to Never

I’ve found this speeds things up nicely when reorganising windows, and it’s also handy when restarting as Terminal won’t hold that up either. If you have a few very common processes (say npm start or rails server), you could add those to the filter list instead and keep the confirmation for everything else.

Terminal’s preference screen allowing customisation of which processes present a confirmation on window or tab close.
Terminal’s preference screen allowing customisation of which processes present a confirmation on window or tab close.

Tags

Next

15 Reasons You Might Need A Website