For those of you who do a lot of work in Terminal, being able to close the window from the command line is a bit of a bear. By default, Apple doesn't allow you to type 'exit' from the command line to close a Terminal session - you'll just get a return statement of:
To avoid this default behavior - to type
exit and actually have it close the Terminal window - you have to dig into the application's preferences. The correct path to find the options for this feature is Terminal --> Preferences... --> Settings tab --> Shell sub-tab --> When the shell exits: drop down. The three options are:
- Close the window
- Close if shell exited cleanly
- Don't close the window (default)
I set mine to close the window. Doing so let's me type
exit and the Terminal window closes, while the app stays open. It's handy for me, since I run a lot of Terminal sessions at once and it's a bit closer to the native Linux behaviors I'm use to, managing several VPSes.
If the instructions above are bit confusing don't worry, I've put together a video screen capture for you to follow along with so you can mod your own Terminal experience. If you like this tip, be sure to like and share the video.