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

7
votes
1answer
651 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 ...
7
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 ...
7
votes
3answers
20k views

uh oh. -bash: ls: command not found

I installed the most recent mac update to OS X Lion (10.7). After I did that, my terminal won't recognize normal commands. I type 'ls' and get: -bash: ls: command not found I figured I'd try to ...
7
votes
4answers
282 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 ...
7
votes
1answer
1k 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 ...
7
votes
2answers
2k views

How can I merge two similar-but-not identical folders?

I have a folder (which is filled with many many sub-folders and files) which is on a FireWire drive [source] which I am trying to move to a USB drive [destination]. I am trying to move all of the ...
7
votes
5answers
2k views

How can I Open Multiple Customized Terminal Shells?

How can I customized Terminal so that when I open the application it opens several shell tabs? If possible I would like to also have it run a different environment script for each tab. Example: Run ...
7
votes
3answers
700 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 ...
7
votes
2answers
2k views

Changing Terminal colors when ssh-ing into remote machine and back

Looking for a way automatically change terminal colors when ssh-ing into remote machine and revert back to the default colors, when exiting the ssh session. Simply, want have another colors when i'm ...
7
votes
2answers
401 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 ...
7
votes
2answers
542 views

How do I find the windowid of Google Chrome to pass to screencapture -l

I'd like to use screencapture -l to do automated screen captures of Google Chrome. This requires knowing the windowid of the Google Chrome process that's running. For apps that support Applescript, ...
7
votes
1answer
851 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 ...
7
votes
2answers
294 views

How can I process/read checkmarks on a paper form?

I would like to process a large number of scanned paper forms (GUI or command line). I am only interested in reading (custom) checkboxes. The form looks like this: every line has 6 circle-shaped ...
7
votes
1answer
783 views

Show text in large type on the screen via terminal

I can put large text on the center of my screen with certain apps, such as Address Book (click on a phone number and choose "Show in Large Type") or using Quicksilver (type some text and choose the ...
7
votes
1answer
845 views

Adding movie-style sound effects to the Terminal

I want to have movie style sound effects in the terminal. You know, when every keystroke and line emits a cool little beep. (Something like this.) I've used KeyClick, but that's only for keyboard ...
7
votes
3answers
2k 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 ...
7
votes
3answers
633 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. ...
7
votes
3answers
2k views

Can Finder and the “open” command treat files with .sh or other typical extensions just like .command files?

I am looking for a way to inject some more extensions into the OS X launch services database systematically so that when clicked, they execute in the terminal app just like .command files do by ...
7
votes
1answer
2k views

How to update some application to latest version with homebrew-cask?

I noticed some packages provided by homebrew-cask uses a url of the latest version and a version number of "latest" such as dropbox and chrome. Thus they will never be upgraded with brew upgrade. Is ...
7
votes
3answers
10k views

How do I mount ejected external USB flash storage?

Suppose that we connect our flash USB drive to a MacBook, then eject this storage from Finder sidebar. Now I want to remount this storage without unplugging and replugging it into the computer, but ...
7
votes
3answers
2k views

How to 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 ...
7
votes
2answers
482 views

Multiuser GNU screen sessions

I am attempting to set up multi user screen sessions on Mac OS 10.7.3 and I run into the error Attach attempt with invalid pid(xxx)!. If set it up as follows: Initial configuration of system: Make ...
7
votes
1answer
91 views

How to “chroot” a terminal inside a DMG?

I'm doing security research and for that purpose I use an SHA-2 encrypted DMG to store the tools and files I work with (containing confidential client info), to protect them from forensic examination ...
6
votes
5answers
13k 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 ...
6
votes
3answers
1k 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 ...
6
votes
2answers
954 views

Change my shell to a different bash version at /usr/local/bin/bash?

How can I set my /usr/local/bin/bash (which is the 4.2 version that allows auto-completion of 'cd to directory with directory name') to be my default bash for a new window instead of my regular ...
6
votes
1answer
6k views

What command combo at terminal will output a list of directories with human-readable sizes?

I'd like to open Terminal.app and enter a command like: my-macbook-pro:~ my-username$ ls -lh Instead of seeing the size of the folders in bytes that are in my current working directory, I'd like to ...
6
votes
3answers
637 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 ...
6
votes
6answers
7k views

Improved Terminal autocomplete funcionality (similar to Matlab's)

If any of you ever used Matlab, you might have noticed the command window functionality in that program. I wonder if it is possible to enable the same functionality in Mac Terminal. It works like ...
6
votes
6answers
563 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 ...
6
votes
2answers
1k views

Are Bash, Bourne, and Korn shells compiled into one binary in OSX?

On OSX 10.8, if you compare the binaries for bash, sh, and ksh, a few different shell options, they are the same size. If you take it further and cmp the binaries, there seems to be only a ...
6
votes
2answers
16k 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?
6
votes
1answer
343 views

Is it possible that some hacker is logged in to my computer?

When I type w at the terminal I see myself logged in two times. What are console and s000? Is it possible that one of these neos is actually somebody else?
6
votes
1answer
4k 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 ...
6
votes
1answer
3k views

Create a termnial 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?
6
votes
1answer
2k 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?
6
votes
3answers
6k 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 ...
6
votes
7answers
6k views

Is there a beginners guide to Unix from the OS X point of view?

I'm hoping to build on my embarrassingly-limited knowledge of the command line, and I know there are a ton of great resources out there. I'm wondering if there are any books or other resources that ...
6
votes
1answer
15k views

Installing .pkg with terminal ?

Is it possible to install a .pkg using a terminal ? (I wanted to install an app through ssh).
6
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 ...
6
votes
2answers
2k views

What option should I give the sudo command to have the password asked through a graphical interface?

This problem has ben bugging me for a while now. Every now and then, I need to write a script file that should execute sudo commands. I do not necessarily know in advance that I will run as sudo so I ...
6
votes
5answers
3k 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. ...
6
votes
2answers
582 views

Change *.txt to *.csv

How can I rename all *.txt in a directory to *.csv files in the terminal (Mavericks). I tried following inside the directory: mv *.txt *.csv
6
votes
4answers
48k views

How do I set environment variables on OS X?

I have always difficulties setting the environment variables on Mac like JAVA_HOME, M2_HOME or PATH. How to set these on Mavericks OS X? I did some research but the answers I've found didn't really ...
6
votes
3answers
253 views

Terminal command to bring up shutdown dialog?

I know how to shutdown a Mac from Terminal, but is there a way to actually bring up the shutdown dialog you get from Apple → Shut Down…?
6
votes
4answers
10k views

how do you change mac terminal theme so that it doesn't go back to 'basic' every time you open it

I just can't find any way to change the theme and have it applied permanently. I really need some guidance here, all I want is to change to another darker theme other than the default 'basic' theme, ...
6
votes
2answers
45k 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 ...
6
votes
1answer
1k 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 ...
6
votes
2answers
660 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. ...
6
votes
4answers
1k views

Is there a better way to shutdown/restart OSX?

Whenever I want to shutdown/restart OSX I click on the menu, select shutdown, and then click the box for not saving the session, and then click OK. Then there's always at least one program that ...