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

9
votes
1answer
2k views

Change Network location from terminal

I have a two locations set up on my macBook. One for normal use and another for when I use a proxy, which I start from the command line. It would be very useful for me to be able to switch network ...
9
votes
3answers
12k views

Reset your PATH variable

I stuffed up (basically wiped) my PATH variable. Is there any way to reset it to the default? I look at How do I reset the $PATH variable on Mac OS X?, but I find it very confusing. As far as I ...
9
votes
1answer
766 views

How can I specify delimiters in Terminal for word and character selection before copying and pasting?

I am new to Mac and still struggling to be productive with fewer clicks and keys... When I use Terminal and click on a word, I would like the delimiter to be only space and not other characters like ...
9
votes
3answers
1k views

copy last command in terminal

I can see last command in terminal by pressing up arrow as in following example: I typed cd /: Makss-Mac:~ maks$ cd / ... pressed enter, command cd / executed and now I can press up arrow and see ...
9
votes
1answer
405 views

Is it possible to set the output language of shell commands to anything other than English?

Am I correct in my assumption that shell commands such as cp, man, ls, etc. always print their messages in English regardless of system and user settings, and also standard shell messages like ...
9
votes
3answers
808 views

Any way to make Cmd-D “delete next word” rather than “split-pane” in Terminal

I am so used to using ⌘D to "delete-next-word" in emacs and xterm, that I automatically hit it in Terminal all the time, which rather annoyingly (to me, at least) causes the pane to split instead. ...
9
votes
2answers
2k views

What has changed in Terminal.app in OS X 10.8?

Just upgraded OS X to Mountain Lion and noticed that Terminal.app version has changed from 2.2.3 to 2.3. Unfortunately, can`t find any information about what has changed. Do you know if there is any ...
9
votes
3answers
13k views

How to fix Terminal error DYLD_ environment variables being ignored because main executable (/usr/bin/login) is setuid or setgid?

Any time I open a new terminal window (independent of terminal app), the console stderr displays dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/login) is setuid or ...
8
votes
4answers
3k views

look up a word in Dictionary.app in Terminal

Is there a bash or applescript to look up a word in /Applications/Dictionary.app from a Terminal window ? open -a /Applications/Dictionary.app/ --args word ignores --args, says "type a word to look ...
8
votes
3answers
2k views

Is there a way to make the terminal's font less blurry?

I have been using a MacBook Pro for about a year or so, and I can definitely say that I am really satisfied from it. But there is one little thing that annoys me about it: the fonts in many text ...
8
votes
6answers
731 views

Where can I find a comprehensive and detailed technical software manual for OS X?

Are there books written for OS X (particularly the most current version) like the hundreds of thousands written for Unix? I'd like to know about the command-line utilities and the locations of system ...
8
votes
4answers
5k views

Inconsolata font does not work in Terminal

I'd like to use Inconsolata as the closest free approximation of the Consolas font for editing and programming on my Mac. After downloading Inconsolata's OpenType file I changed TextWrangler's ...
8
votes
6answers
2k views

How to prevent the application launched in Terminal from undesirably exiting?

I launch applications from the Terminal with commands like this one : /Applications/Mail.app/Contents/MacOS/Mail & The important part is the &. For Unix / Linux / Solaris : I have ...
8
votes
1answer
8k views

Create a Terminal command to open file with Chrome

I want to create command in terminal that would allow me to use chrome index.html and have the the given file open in Google Chrome. How can I get this working?
8
votes
2answers
78k 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 ...
8
votes
3answers
35k views

“-bash: ls: command not found”

I installed the most recent update to OS X Lion (10.7). After I did that, my terminal won't recognize normal commands. I typed ls and got: -bash: ls: command not found I figured I'd try to add ...
8
votes
1answer
3k views

Transparent Background in Terminal?

On Ubuntu, I can change the terminal background to be semi-transparent. I've seen other people do this in OSX, but I don't see the setting anywhere. Is there some way to make this happen?
8
votes
2answers
4k views

Make ls command sort by file type (e.g. directories and file extension)

How do I make ls sort by file type (e.g. directories first and then by file extension)? The answers suggested in (Super User) Make ls sort by file type result in unknown option errors from ls.
8
votes
4answers
4k views

Remotely SSH to IP address in home network

I've got a device at home I want to SSH to from work. The device has port 22 open locally and I have port 22 opened on my AirPort Extreme. However, on the AirPort Extreme it says the open 22 port only ...
8
votes
1answer
860 views

Access Airport signal data

I want to be able to write the current list of Wifi networks in airport, and their respective strengths, to a file. I would like to use some sort of bash script to do this, but I am unsure how to ...
8
votes
3answers
1k views

TotalTerminal doesn't work with full-screen apps

TotalTerminal (former Visor) is an awesome plugin for Terminal that turns it into a Quake-style console that slides down on a key combination. This is tremendously useful for development because I ...
8
votes
1answer
21k views

Mac OS X Mavericks - add to path

I'm trying to set up a phonegap project and while trying to add a platform it outputs the following error: Error: The command "android" failed. Make sure you have the latest Android SDK installed, ...
8
votes
2answers
374 views

How would I go about making a stand alone app on my dock to open a game using a terminal command?

I have a game that they never released for mac, and I installed the game using WINE, the install itself was flawless, but every time I want to play it, I'm forced to open Terminal and run cd ...
8
votes
2answers
5k 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?
8
votes
1answer
2k views

Why does the folder icon in my Terminal have a question mark overlaid?

From time to time, I spot that the folder icon in the titlebar of one of my Terminal windows has a question mark overlaid on it, e.g. this one: What does this mean? It doesn't seem to have any ...
8
votes
3answers
16k views

How do I check the download progress of Mountain Lion through the terminal?

I am downloading Mountain Lion, I know I can monitor download progress through the Mac App Store purchases screen but I want to know if I can monitor progress through Terminal.app using a shell ...
8
votes
5answers
3k views

Open new terminal window in current space, regardless of other open terminals in other spaces

When using Spaces on Mac OS X trying to open a new terminal instance results in focus being pulled to whatever space has the most recently accessed terminal window. With Finder I can click on the ...
8
votes
3answers
825 views

How to remove .DS_Store from command-line auto-completion using cd?

I understand that .DS_store files serve a purpose. That said, they are a nuisance when auto-completing with the cd command. When I type cd in Terminal and press tab twice it lists all directories in ...
8
votes
2answers
626 views

Can I configure terminal to show stderr output in different colour

Is it possible to configure the terminal in OS X to show stderr output automatically in a different colour than stdout output from a process? Or is this only possible if the process is outputting ...
8
votes
1answer
1k views

How to share history between terminal tabs?

I generally find myself using two or three tabs in my Terminal on OS X. A minor inconvenience is often that the tabs don't share a command history. So things like history | grep thingIamlooking for ...
8
votes
3answers
1k views

How much data has been written to my SSD over its lifetime?

Is there a Terminal command which will show me how many GB has been written to my SSD through the whole lifetime of the disk? I'm asking because I want to find out how many cycles have been done. SSD ...
8
votes
2answers
2k views

How do I change the location of screenshot in OS X Lion?

The old method that works for Leopard/Snow Leopard doesn't work any more on Lion: defaults write com.apple.screencapture location /Users/kamus/Pictures/snap Has something changed or does anyone ...
8
votes
2answers
6k views

Changing Preview.app's default View state in Lion

One thing I dislike about Preview.app in Lion is its defaulting to Continuous Scroll as the view option when a new PDF document opens. My recollection is that previous behaviour was for the last-used ...
8
votes
3answers
4k views

Why don't my arrow keys work in vim under iTerm?

They work just fine if I use Terminal and start a vim session, but under iTerm I have to resort to using H-J-K-L to do left-up-down-right movement. In both Terminal and iTerm TERM=xterm-color. My ...
8
votes
1answer
2k views

How can I initiate a Google Voice phone call from the command line?

Thanks to Brett Terpstra I can easily send an SMS through Google Voice in Terminal, but now I want to be able to initiate a phone call via Termainal too. There is no Google Voice API (yet?) so I know ...
8
votes
3answers
3k views

How to programatically add folder to Spotlight “do not index”?

Is there any way to programmatically add a folder to Spotlight's "Privacy" tab? Either through Terminal or Applescript? Often I want to click on an item in Spotlight results in Finder, and have that ...
8
votes
2answers
2k views

mount is adding a quarantine flag, causing: /bin/bash: bad interpreter: Operation not permitted - but not the usual suspects

OK, I'm having a similar problem to: -bash: Applications/mvim: /bin/sh: bad interpreter: Operation not permitted - but it's not the same problem. I'm getting the same result. I've already verified ...
7
votes
3answers
4k views

error: There was a problem with the editor 'vi' when using it with git

I have this strange problem with using vi as the editor for git commit -a. Normal flow is: I type git commit -a, vi appears, I enter my commit message, and then :wq to save & exit from vi. This ...
7
votes
3answers
10k views

Change Terminal.app's Default Shell to BASH

How can I change Terminal.app's default shell to BASH? For some reason, my friend's Mac (10.6.6) defaults to using TCSH instead of BASH. The obvious remedy is to choose /bin/bash as the command to ...
7
votes
6answers
3k views

OS X Terminal equivalent of Ctrl+Left / Ctrl+Right

In Windows and Linux I could always hit ctrl+← or ctrl+→ to skip a word to the left or right in the terminal. In text editors it seems that ⌥+←/→ works, but no dice ...
7
votes
2answers
662 views

Is there anyway to have a badge icon appear on the Terminal icon when a command completes?

I currently have an Applescript app that opens Terminal windows and completes commands. I would like a badge icon to appear on the Terminal icon when a command completes. I need this because I often ...
7
votes
3answers
1k views

Can the contents of a partition be recovered after partition table is overwritten?

I ran a command to make my external hdd bootable knowing that it was risky considering the command itself did not allow me to specify a partition to which to write. (In hindsight, I would now call ...
7
votes
3answers
3k views

How can I add reminders via the command line?

Once in a while it may be useful to add some reminders to Reminders.app from the command line — especially because they are synced to iCloud. Is there any way to do so? A solution that does not rely ...
7
votes
2answers
4k views

Time in milliseconds since epoch in the terminal

How do I get the time since the epoch, in milliseconds, in the OSX terminal? The Linux/Ubuntu equivalent is date +%s.%N: Linux $ date +%s.%N 1403377762.035521859 Which does not work in my OSX ...
7
votes
1answer
4k views

Set default shell to MacPorts bash in Mac OS X 10.6.8?

As a follow up to my previous question, I reinstalled my MacPorts and want to try its newer version of bash again. I installed the newest bash via MacPorts on my Mac OS X 10.6.8 system, but when I ...
7
votes
1answer
2k views

Completely clear all output from a Terminal window

I would like to clear all output from a Terminal window (including all historical output) to get it back to a clean state as if you had just opened a new Terminal window, or a new Terminal tab. I can ...
7
votes
5answers
5k views

How to make terminals open side-by-side?

I use terminals a lot, and I frequently open and close them. The problem is that whenever I open a new terminal using ⌘+n it overlaps the current one, and I have to move it out of the way first. ...
7
votes
2answers
2k 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 ...
7
votes
2answers
4k 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 ...
7
votes
4answers
467 views

Can I run top as screensaver?

My employer has recently issued me a MacBook Pro to play with. I have a lot of Linux experience, but I was struck by how nice the terminal looks on the Mac in full screen mode, especially when running ...