Terminal (or Terminal.app) is the program included in Mac OS X for running applications and issuing commands using the command line interface. These programs are controlled by typing lines of text, rather than using the mouse or keyboard commands in the usual graphical user interface (GUI).

learn more… | top users | synonyms

5
votes
4answers
11k views

How can I save SSH Bookmarks in Terminal?

I've recently become infatuated with TotalTerminal and am tempted to switch from iTerm back to Terminal just so I can use it, except that I rely heavily on a half dozen SSH bookmarks in iTerm. Is ...
5
votes
3answers
6k views

Use MacVim as standard Terminal?

I used to love the terminal.app for many reasons. I especially liked the way I could navigate to a file and edit using vim it all in one app, without having to leave the keyboard. But, since the ...
5
votes
5answers
1k views

OSX Bash for loop - issues with spaces in folder names?

I'm getting a bit confused on how to handle spaces in path names when returned in a for loop. Rationale: I'm cleaning up the permissions on folders and files that I copy over from Windows. Most of ...
5
votes
3answers
575 views

After typing sudo I can no longer autocomplete commands by pressing Tab

In a Terminal, if I type beginning of any command by pressing tab I can see the rest of that command. However this feature does not work with any words I type after sudo. How can I complete command ...
5
votes
1answer
3k views

Move to Start of Line in Terminal.app

Is there a quick key combo that will allow me after typing some stuff in the OSX terminal to move back to the beginning of that line? I have tried different things, and was wondering if there is a ...
5
votes
2answers
11k views

Using Terminal, how can I find which directory is my USB drive mounted in?

I am using Terminal and have looked through directories. I just can't find where my USB drive its directory is. Which directory is my USB drive mounted in?
5
votes
3answers
4k views

How can I install themes for Terminal?

I am rather new to Mac, but I am trying to get familiar with Terminal and I want to change its theme. I am a bit confused on how to go about installing Solarized themes I am seeing so much of around ...
5
votes
1answer
2k views

Is there a way to force Mac OS X to close all the applications when restarting?

I sometimes shut down my Mac, and I cannot wait it shuts down because I am urgently requested to do something in another office that would require some hours. In some cases, an application that opens ...
5
votes
2answers
372 views

Command to close terminal window

When I want to close a window I type exit : mbp-thomas in ~ ○ → exit logout [Opération terminée] Then cmd + w to close the window. Is there a way to do it with a little script like if I type ...
5
votes
2answers
474 views

Is there a UNIX-style triple click to select path in Terminal.app?

In Red Hat, if there is a path somewhere on my terminal window and I triple click it, the whole path is selected. I can then easily copy it using middle-click or a regular copy-paste. This doesn't ...
5
votes
3answers
5k views

How can I add a path to the PATH environment variable?

I want to add a path to the PATH environment variable? I have tried with export PATH=/mypath:$PATH and it works. But the next time I start the Terminal, my new path is not int the PATH environment ...
5
votes
3answers
6k views

Where are bash profile startup files?

I know that you can have a .profile or .bash file in your home folder to customise Mac OS X 10.6.4 Terminal bash startup. Every time I start up Terminal, there is a line that tells me "You've got ...
5
votes
1answer
164 views

How to launch TextMate (and probably other software) from the command line?

I am very new to Mac, coming from Linux. I am using TextMate, and I suddenly discovered I do not know how to launch TextMate from command line. Using completion, nothing looks like TextMate. Where ...
5
votes
3answers
6k views

Merging Multiple CSV Files without merging the header

I need to merge multiple .CSV files (using the cat command) but without copying the header for each file. What's the best way to accomplish this task?
5
votes
4answers
3k views

iTerm2/Terminal full screen

Why is it not possible to have iTerm2 or Terminal app take up the full available space on the screen. Let me show an example: It's hard to see but if you look on the right and bottom edge, there is ...
5
votes
2answers
535 views

Terminal doesn't show badge - how to enable?

Opposite to another question here I want the badge count to appear. I have the "resume" function enabled in my Lion. Is there another setting that's responsible for the badge? To clarify I run tail ...
5
votes
1answer
3k views

How do I get Wi-Fi info from within Terminal?

Is there a way to get BSSID and the list of available Wi-Fi networks from within Terminal? I.e. I'm looking for something similar to ifconfig run0 scan on OpenBSD, which lists all access points, ...
5
votes
2answers
33k views

How do I make the hard drive visible in the Finder?

On OS X Lion I don't see the hard drive in the Finder and I seem to have no permission to create a folder under / from terminal. I know I can do this if I activate the root user, but I need to be ...
5
votes
2answers
493 views

How can I have my shell always start in a certain directory that is not my home directory

I've tried putting cd /Users/my_name/my_directory/structure in both .bashrc and .bash_login but neither works, i.e. when I open a new terminal window I am in my home (/Users/my_name/) directory. ...
5
votes
1answer
387 views

Parental Controls not restrict Terminal Commands?

I have a Parental Controls limit on my child so I have to type in my password when they open a new application. I have recently discovered a problem though. They have tried programming in terminal. ...
5
votes
3answers
3k views

How can I manipulate several security settings from terminal?

I want to change these behaviors from terminal: Auto-login Showing password after screensaver and sleep mode Go to sleep mode after x minutes Enable screensaver after x minutes
5
votes
3answers
2k views

Opening a terminal window to a specific directory from a bash script

How can I write a bash script in Mac OS X that opens a Terminal window in a specific directory? I'd assume something like: open /Applications/Utilities/Terminal.app But that does nothing (maybe ...
5
votes
2answers
699 views

Is it possible to get the full suite of unix options for the command line tools on OS X?

I follow Unix Tool Tip on Twitter and it is interesting that many of the tips that are posted are not available on OS X. For example: cp - u will only copy files that don't exist, or are newer ...
5
votes
1answer
395 views

What does Force Quit do in OS X?

How does the GUI interface for force quitting applications (⌘+⌥+esc) work? e.g. Does it work like killall Finder which would send a TERM signal by default?
5
votes
1answer
2k views

How can I tell which volume the operating system is on?

I'll admit that I am kind of rolling multiple questions in to one here so please forgive me and try not to knock me for it. I am new to Mac but I'm trying to port one of my Java applications to OS X. ...
5
votes
2answers
823 views

Can sudo use my existing aliases?

How can I let sudo use my existing aliases in my .bash_profile (or .bashrc, .profile …)? For example I want to be able to use ll instead of ls -laGF as sudo.
5
votes
1answer
80 views

Is kill -15 the same as File -> Quit?

I want to quit a process but without force quitting it. Is that possible from the terminal?
5
votes
2answers
3k views

Linux 'Byobu' equivelant for mac

So at home ive been a linux user for a while, and frequently use byobu in the terminal. After a little searching I was unable to find anything like it for a mac, which I now have to use at work. I'm ...
5
votes
4answers
3k views

Alternatives to command line unzip?

I've found that the command line unzip tool doesn't gracefully handle some of the files I'm unzipping: it makes a bunch of junk directories, and creates files whose resource forks aren't found. ...
5
votes
4answers
1k views

Automatically quit Terminal when typing exit

Scenario I use terminal to SSH a lot, however would like the Terminal App to quit when the last Tab closes using exit. I already have the terminal window itself set to close on successful exit, ...
5
votes
2answers
174 views

How can I launch a GUI app in Applications folder from command line?

I would like to launch a GUI app that is in the Applications folder from the command line as opposed to clicking the icon in the Finder or in the Dock. The reason I want that is to be able to launch ...
5
votes
2answers
890 views

What does -HUP do when used with killall?

Sometimes when I'm running a killall command from Terminal, a co-worker would suggest or edit my scripts to show killall -HUP. What does the -HUP part do?
5
votes
1answer
11k views

Installing .pkg with terminal ?

Is it possible to install a .pkg using a terminal ? (I wanted to install an app through ssh).
5
votes
2answers
7k views

How to move the Downloads folder (in Mountain Lion) to another disc

I want the "Downloads" folder not on the system drive but on my second internal drive. In Lion I just deleted the "Downloads" folder and replace it with an alias with the same name (pointing to the ...
5
votes
1answer
4k views

How to control AirPort wireless radio from the command line?

I want to know how to control (specifically turn off) the networking (specifically AirPort - I want to turn off the radio) from the command line (specifically from bash in Terminal.app, being run by ...
5
votes
3answers
6k views

Why is my host name wrong at the Terminal prompt when connected to a public WiFi network?

For three days straight, I have connected to the public WiFi network at my local library. Each day, I have seen a different prompt in Terminal. Here are some of the prompts I've seen: zp-pc:~ ...
5
votes
4answers
632 views

Newly Installed App (gem) Via Terminal, Path?

I have used sudo gem install to install a few gems. My question is how do I know where the executable was installed, so I can add it to the path in .bash_profile?
5
votes
1answer
105 views

Weird line wrapping in terminal with a colored prompt

I have reason to think I've got improper escaping in my bash prompt (I get weird random line wrapping in Terminal). Can anyone point it out? It looks OK to me... export PS1="\033[0;35m\u\033[00m on ...
5
votes
1answer
3k views

Where are the Terminal settings stored on OS X?

You'd think A) I'd know this by now, and B) that it's readily available info, but apparently neither is the case. What I'm looking for is where the config files (colors, etc.) that ship with ...
5
votes
3answers
2k views

Is there a way to remotely restart Finder (or wake-up the desktop) from SSH?

Over the last few months I've found my MacBook Pro is getting increasingly unwilling to wake-up if it's gone to sleep of it's own accord - not when I put it to sleep deliberately, but when the machine ...
5
votes
2answers
615 views

Strange behavior in Terminal with custom .bash_profile

It's hard to describe the behavior, but here's a short clip: http://www.youtube.com/watch?v=9KqHBA94FPI Basically, when entering multi-line commands, at the end of the first line, the insertion ...
5
votes
2answers
986 views

Strange message in terminal when visiting a website

I have my terminal open most of the time. Today while I was searching for a software, search results took me to http://download.cnet.com. I didn't like the software, closed the page and carried on. ...
5
votes
1answer
389 views

I got an image on terminal from the output of homebrew package manager

I got a strange image from the output of brew like this . I'm curious about this behaviour. Is this a feature of brew or the image comes from some special character set? If a character in some ...
5
votes
2answers
664 views

Smarter Bash Tab Completion

As a recent switcher from Ubuntu (Well recent switch backer if that's a word) I'm finding myself in the command line a lot more than when I was a mac user before. One thing I really loved about Ubuntu ...
5
votes
1answer
302 views

How can I open a new customized (color, font, etc.) Terminal window from the command line?

I'd like to open a new Terminal window in Terminal.app. I'd also like to be able to customize this window (color, text, etc.), based on one of my pre-defined defaults, or based on something else not ...
5
votes
1answer
1k views

VIM in Terminal using Solarized Theme

I am trying to use the Solarized color scheme with VIM in Terminal on Mac OS X 10.8.5 Mountain Lion. However, the colors look washed out. They are lighter/paler than they should be. In MacVIM, the ...
5
votes
1answer
2k views

How do I make ⌘← and ⌘→ work for home/end combo for Terminal?

Why does fn-⇧-→ (or others) do a home/end in Terminal but a ⌘-→ works everywhere else? So just to be clear the question is how to make Terminal take Command + ← and → for home and end?
5
votes
2answers
914 views

opening tab in terminal resizes window

I like to adjust my terminal window size to fit whatever I'm working on at the moment- sometimes a tiny screen just to tail a log file, and sometimes I stretch it all the way across the screen to read ...
5
votes
5answers
4k views

How do I restore my .bash_profile?

I've accidentally overwritten my ~/.bash_profile file. Does anyone have a "sample" one I could copy, or know where I might be able to find one?
5
votes
1answer
15k views

How do I remove a user via single user mode in 10.7?

I occasionally will setup a user's machine that has been in for repair beyond the simple re-install of the OS. For example: install a new hd, install the OS, create a user, install updates and then ...