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
3k views

What is the difference between the sudo and su command?

What is the difference between the sudo and su command? Why does OS X handle these different than Linux?
4
votes
3answers
2k views

How to make Mac Terminal restore working directories when restarting

I use the Mac Terminal with a hand full of tabs each assigned to a different working directory. I have configured it to open new windows with the same working directory. Nevertheless, when I am ...
7
votes
4answers
16k views

How do I execute a bash script that requires root privileges?

I have this script lines from my ISP: sudo bash echo "plugin L2TP.ppp">>/etc/ppp/options echo "l2tpnoipsec">>/etc/ppp/options It works if I paste line by line into Terminal. I want to ...
4
votes
5answers
170 views

Learn about basic OS X applications

I have been a Windows user and have recently started using OS X (I have Snow Leopard on my machine). I wanted to learn about the basic applications in OS X (e.g. Terminal) and other commonly or some ...
0
votes
1answer
74 views

Text unselected when clicking to activate Terminal window (OS X Lion)

I've noticed this behavior in Lion's Terminal.app: Let's say I have some text selected in a non-active terminal window. Meaning, another window is active - it could be another terminal window, or ...
3
votes
1answer
773 views

-bash: Applications/mvim: /bin/sh: bad interpreter: Operation not permitted

I am getting a weird error with the mvim script that is supposed to start the MacVim interface. See below for the issue. /bin/sh is just fine, mvim was chmod +x'd, other /bin/sh scripts run fine... ...
15
votes
2answers
10k views

Amending PATH so that /usr/local/bin is ahead of /usr/bin

I'm trying to install brew but get the following warning: Warning: /usr/bin occurs before /usr/local/bin This means that system-provided programs will be used instead of those provided by Homebrew. ...
1
vote
3answers
1k views

Create a file which when opens and writes a line in Terminal

Is there any way to create a file which, when clicked, opens up Terminal and types in and executes a specified line? (eg: say hello world)
1
vote
0answers
210 views

Midnight Commander installed via Ports to support scp

I have installed Midnight Commander via Ports, but I am unable to connect to a remote computer to copy files as: cd #sh:user@server.net I keep getting: "Cannot CHDIR to #sh:user@server.net". ...
0
votes
1answer
455 views

Allow the Terminal.app to pass command key based keystrokes to terminal programs

I want to allow programs running in the terminal the ability to interpret the keyboard short cut Cmd + S I have already Remapped the Terminals' default binding of Cmd + S to Ctrl + S via the ...
2
votes
1answer
1k views

Bind <Cmd-S> in Vim

Is it possible to map to save in vim in a standard terminal? I know how to set it in my vimrc but am not sure if it is possible to pass it from terminal to vim instead of attempting to save the ...
2
votes
2answers
213 views

Where does terminal look for its commands?

I've just installed pypy, and I've made a symlink from /pypy to my pypy installation. How can I turn this into a command, so that I can just type pypy myfile.py instead of having to type /pypy ...
6
votes
3answers
952 views

Open Terminal.app with directory from a given URL?

With the URL <file:///Library/Fonts> (for example in a note in NV) I can open the finder with the given location. Can I do something similar for the terminal? That is, if I write for example ...
19
votes
3answers
8k views

iTerm as a slide-out terminal from the top of the screen

I have installed iTerm2 and was hoping I'd have something like guake (Yes I just switched from Ubuntu). I mapped the hotkey to a button of my choice and it works fine, but I miss the ...
3
votes
1answer
6k views

How to ssh to remote web server without using a password

I'm new to OS X. As per title, I'm having trouble connecting to my web server through SSH. My server accepts keys and we don't use passwords. I've come from windows, and on windows I used PuTTY to ...
2
votes
1answer
118 views

Mercurial command line client not found

I have the latest version of Mercurial installed on a fully patched Lion and the Mercurial client cannot be accessed from the terminal ("command not found"). The command line client is installed in ...
1
vote
0answers
359 views

How to include the failing username on saslauthd failure in a log file in Lion?

How can the verbosity of logging be increased for SASL authentication failures? To be more precise, to include the failing user name in a log file on Mac OS X 10.7 (Lion) Server? Linux hosts have ...
2
votes
3answers
235 views

What tools exist to recover a file I clobbered using cpp in terminal?

I accidentally typed cpp Scriptname.py DestinationDirectory, intending to copy the Python script into the folder. I realized afterward that I should have used cp, but now my Python script is ...
1
vote
1answer
306 views

Switching terminal styles in iTerm 2

Recently I've been trying to become more efficient at the command line, and stumbled upon iTerm 2 a couple days ago. One feature of iTerm 2 is that windows can appear from the top of the screen, so ...
7
votes
2answers
415 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 ...
0
votes
1answer
2k views

jDownloader-like command line tool or lightweight GUI App?

I use jDownloader which works great, but takes a lot of time to load and surprisingly takes a lot of time also to start and stop downloads. I'd like to have a similar functionality* but with a ...
1
vote
1answer
230 views

Simple File Transfer Logs

This may be a general Unix question rather than a OS X question. I want to log general file transfers on OS X, whether it be from and to the same system or to another system, but to keep it simple ...
8
votes
2answers
9k views

How to control Bluetooth wireless radio from the command line?

This question is almost the same as my previous question, but with one major difference; I want to turn on/off Bluetooth from the command line (bash or similar), NOT from AppleScript - the answers for ...
1
vote
2answers
232 views

Change Snow Leopard Login Wallpaper w/ Terminal

I know this is possible as I did it once before. How do you set the login background wallpaper to something else using terminal?
0
votes
1answer
50 views

cmd + [num] doesn't change screen to go to app in fullscreen mode

Consider the situation where I have two spaces screens. From the second screen I open a terminal and make it fullscreen. By doing so I expected cmd+3 to take me to the terminal app, but it doesn't ...
1
vote
5answers
4k views

How do I fix Terminal.app when my shell has been set to an illegal value?

Today I was mucking about trying to uninstall macports when I noticed an error being thrown up whenever I used sudo. I killed Terminal and tried to restart it which failed with the error message ...
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 ...
7
votes
1answer
587 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
3answers
6k views

How do I run VI with colors on Lion?

I'm looking to enable color syntax highlighting in vi. I just enabled colors in Terminal via here. Any ideas on how to enable this? NOTE: Usually on Linux when I open vi with vi file.txt and it opens ...
2
votes
2answers
782 views

Lion Recovery Terminal will not allow me to run TestDisk?

Setup: Macbook Air (2011) running Lion with BootCamp (Windows 7). Problem: I have somehow screwed up my partition table. When I boot I only can select Windows instead of Windows and Lion. However ...
4
votes
3answers
379 views

How to search for a file by a hash value with bash script (terminal)?

I am writing a script for Mac OS X Lion 10.7 and I would like to know how I can search for files based on their SHA1 hashes. I would like to search the whole file system for the file(s) I will be ...
3
votes
1answer
520 views

Is it possible to open in default browser a URL from command line reusing same tab?

I know that I can use open command to open a URL in a default browser like: $ open http://google.com But what I would like is to execute a similar or same command to open different URLs one after ...
5
votes
2answers
773 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.
10
votes
3answers
6k views

I installed Xcode but I still don't have gcc in my terminal

I just got a Mac and I'm a complete newbie, so this may be kind of a really easy question, but I wasn't able to solve it with Google or F1. I was trying to run a C program from the Terminal that ...
2
votes
2answers
168 views

Lion Fullscreen Desktop Switching Quirk

I make Java programs, many of which require input from the command line before they actually open a window. When I'm using the Terminal in fullscreen mode and I run java Program, it jumps over to an ...
14
votes
4answers
9k views

Is there a command line mail program for Mac?

My C++ professor has had us use Terminal for editing code. Is there an app or program that will allow me to send and receive email via Terminal, so I can stay in one window?
2
votes
2answers
306 views

Single Click in Terminal to Select Text

I've been searching for a while on this one and the only answers I can dig up are "use X11"...so I thought I would bring it to the experts. Is there a way to configure mouse gestures/actions in the ...
0
votes
3answers
18k views

Access Applications directory in Terminal

I'm really new to command line and I'm trying to access my Applications directory within Terminal. By default, I am stuck in my user directory but Applications is a child of the "Macintosh HD". ...
18
votes
5answers
3k views

Disable Command-W in the terminal

Is there any way to disable Command+W in the terminal? On several occasions I have accidentally closed a terminal window containing important information when I meant to close a Safari tab and did ...
1
vote
1answer
550 views

Saving files on lost focus in console Vim

I have been trying to setup the console version of vim to save any changed files when the Terminal window loses focus. Following these instructions does not work. Am I to assume that maybe the ...
19
votes
7answers
12k views

When I open Terminal, I get an “I have no name!” prompt

Suddenly, this morning, I open a Terminal window and I get this: I have no name!@macbook:~$ whoami 502 ** I am not a number! I am a human being! ** What gives? Anyone know what I need to do to ...
3
votes
2answers
1k views

Will a Perl script still run after I log out of my user account?

I have started a Perl script from the terminal that runs in the background: >perl myScript.pl & If I logout, will it stop my script from running? Thanks!
8
votes
5answers
4k views

sourcing bash profile for root users

Apologies in advance if this question is going to annoy the hell out of everyone as I appreciate, it's been asked in various ways many times before. Please be assured, I have read the archives and ...
0
votes
1answer
131 views

Change a Mac Mission Control wallpaper using the terminal

I can use Automater to change the wallpaper of the current "space" im in, but I can't tell it to change another space. Any thoughts?
4
votes
1answer
4k views

Howto merge files after using split command from terminal?

I've split a large file with the split command from a terminal and copied it from a usb-stick to my macbook. This results in couple of files named 'xaa', 'xab', 'xac'. How do I merge them together ...
1
vote
1answer
715 views

Terminal.app ignores ~/.profile file settings

Terminal started to ignore profile file settings, which I didn't change in a long time. How can I force Terminal to respect the file again? I tried to delete and recreate but it didn't help... My ...
6
votes
4answers
915 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 ...
1
vote
2answers
848 views

Paste text stored on Clipboard to a variable using pbpaste

I have some text stored on my clipboard. I want to store this text onto a shell script "variable". So something like: ls -altr > pbcopy tmp="something" pbpaste > $tmp # this doesn't get the ...
3
votes
2answers
2k views

Mac terminal shows 'null' for host name at the prompt

I've got a new Mac and I've noticed on the terminal I get a null instead of some kind of name there before on my previous computer. Last login: Fri Mar 9 10:14:57 on ttys000 (null):~ Macuser$ I'm ...
0
votes
1answer
516 views

unable to run ddd on mac

I am trying to install ddd debugger on my MAC. It installed fine, however when I try to run it I get the following error: bash-3.2$ ddd test Error: No `Ddd' application defaults file To resolve this ...