Terminal – Turn Off Default New Window on Startup

terminal

Whenever I open the terminal a new window automatically opens up, I'd like to turn it off so that when I open the terminal I don't get a window and have to manually choose one from the shell menu.

The reason is that I'm opening a 3rd party application which opens an REPL in the terminal, and thus when the app opens the terminal I get two windows, one is the REPL which I want, and the other is another default window which I don't.

Best Answer

In Terminal's General preferences, go to profiles and create a new profile (let's call it "exit"), then under the Shell tab check the "Run command" option and enter "exit" with Run inside shell checked and "When the shell exits" set to "Close the window."

enter image description here

Then under General preferences, under "On startup" simply choose your new "exit" profile. This will still briefly open a window, but there's no way to have Terminal on launch do absolutely nothing.

You might want to check out iTerm2.