Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Why doesn't "exit" close a Terminal.app window on Mac OS X?

$ exit
logout

[Process completed]

Is there a way to close the window without using the mouse?

share|improve this question

migrated from stackoverflow.com Jun 29 '10 at 23:18

This question came from our site for professional and enthusiast programmers.

4 Answers 4

A window displayed by Terminal.app is just the frontend for the process you choose to run inside of it - in your case, a Unix shell. When you exit the shell, the Terminal.app does not close the window by default, so you have the possibility to inspect the output from whatever command you ran, after it finishes.

You can change your preferences here

Terminal Preferences -> Settings -> Shell:

to either

  1. always close the window, whatever the exit status of the shell was
  2. close the window if the shell exited cleanly
  3. keep the window open (the default)

Besides that, you can (almost) always close windows in OSX with Cmd-W, so you don't need mouse even if it doesn't close automatically.

One more hint: I like hitting Ctrl-D instead of typing exit. Two keys vs. five.

share|improve this answer

Command + Q -> closes the application/process.

Command + W -> closes window/instance

share|improve this answer

I also suggest against the killall suggestion. As suggested modify the settings in your preferences to close window if shell exit was successful. If you're REALLY LAZY (like me), open up your bash profile and add an alias. I have mine set so all I have to do is type 'q'.

share|improve this answer

If you want to terminate the application itself from the commandline:

killall Terminal
share|improve this answer
3  
that is considered harmful. Apart from the fact tha killall does different things on different Unix versions, it's not nice to kill an application instead of asking it to just quit. –  Florenz Kley Nov 15 '12 at 13:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.