close a mac terminal


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users close a mac terminal
# 1  
Old 12-21-2011
close a mac terminal

Is there a trick to closing a mac terminal with a command? I would think you could just type exit into your terminal but that doesn't work. I also tried quit and close just for the hell of it and that didn't work either. Does anyone know what the command is?
# 2  
Old 12-21-2011
If you are trying to close a Terminal window then configure the Terminal preferences: Settings > Shell . Set "When the shell exits:" to "Close the window" and "Prompt before closing" to "Never". When you type "exit" the window will close.

If you want to quit the Terminal application then configure the preferences as above and use this command->
Code:
osascript -e 'tell application "Terminal" to quit'

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Terminal running bash/rsync script does not close with exit (MacOS High SIerra)

Hello, I am running a bash script to do an rsync back on a computer running MacOS High Sierra. This is the script I am using, #!/bin/bash # main backup location, trailing slash included backup_loc="/Volumes/Archive_Volume/00_macos_backup/" # generic backup function function backup {... (12 Replies)
Discussion started by: LMHmedchem
12 Replies

2. Open Source

The Terminal on Mac OS X

Does anyone know the differences in commands when it come to Linux and Mac OS X? I'm wanting to know if I use "this" command in Linux and It doesn't work in Mac then what command is equivalent to the one in Linux. Example Ctrl+Alt+f2 switches to (tty2) so what equivalent switches to ttys2 on Mac? (13 Replies)
Discussion started by: 1negroup
13 Replies

3. OS X (Apple)

The Terminal on Mac: Coding

So found this C code online and need to compile it in Terminal on Mac. Here is the code: #include <stdio.h> #include <math.h> int option; char q; int number; int currentsum; int value; void calc() { printf("\t\t\t\t\tBegin\n"); // says begin in top middle of screen ... (3 Replies)
Discussion started by: 1negroup
3 Replies

4. UNIX for Advanced & Expert Users

Close UNIX terminal

Hi, In one of the circumstances, my manager asked my password and opened unix terminal (Putty) with my user credentials. Its been more than 2 days that terminal is opened (saw it through finger command). How do I close that terminal which is not opened in my pc. I'm very uncomfortable of the... (11 Replies)
Discussion started by: bobbygsk
11 Replies

5. Shell Programming and Scripting

script does not close terminal after running

For a small script i want it so that the terminal closes when the script has completed its tasks. To do so i use at the end if the script the following: echo "Hello, World!" echo "Knowledge is power." echo "" echo "shutting down terminal in 10 seconds" exit 10 however the terminal stay's... (3 Replies)
Discussion started by: Ditzyken
3 Replies

6. Shell Programming and Scripting

How to checkout from SVN using Terminal in Mac OS X?

Hi, I am new for SVN. Earlier I have been using CVS. When I checkout the code from SVN using Eclipse, the size of the source code checked out is 612MB. But when I try to checkout from terminal, from my 5.8 branch , the checked out source code's size is only 312.1 MB. Can anyone tell me... (0 Replies)
Discussion started by: Afreen
0 Replies

7. AIX

User cant log in (close terminal)

Hello everyone I have a user on my server, Aix 5.3 TL9 sp4. Weeks ago I dont have a problem but today the user cannot log in. let me explain. Me with root user I can change his password. then I log in with the user and I can change the password and the terminal close. Im using ssh. But... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

8. UNIX for Dummies Questions & Answers

How to create new users on my mac from the terminal

I finally got how to su - in my mac from the terminal. Now I would like to be able to add new users. useradd -m -d ..... doesn't seem to work. (1 Reply)
Discussion started by: bigmac18
1 Replies

9. OS X (Apple)

New to Mac OS X Terminal

Hi everyone. I'm new to using the Terminal and was just wondering if anyone had a link to perhaps a list of commands. And tips on some useful websites to visit or books to read. Oh and is there a way to delete just part of the Terminal's history? If so what is the command? Thanks :) (2 Replies)
Discussion started by: xsemperidem5
2 Replies

10. UNIX for Dummies Questions & Answers

Mac OS X/UNIX/Terminal Question

Hey everyone I'm new to UNIX due to the new Mac OS X operating system and would like some help. I'm trying to send an email via the UNIX-Shell-Terminal i Mac OS X, (it's called darwin) How do I do that? When I enter the Command mail I can send messages to root and with the command -forward... (4 Replies)
Discussion started by: onkel
4 Replies
Login or Register to Ask a Question