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

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
218 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
490 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
221 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
1k 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 ...
24
votes
3answers
10k 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
126 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
388 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
244 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
320 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
475 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
245 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
10k 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
240 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
5k 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
629 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
872 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
405 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
613 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
1k 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
7k 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
171 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 ...
16
votes
4answers
10k 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
313 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
22k 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". ...
20
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
610 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
13k 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!
9
votes
6answers
5k 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
139 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?
5
votes
1answer
5k 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
743 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
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 ...
1
vote
2answers
1k 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
582 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 ...
2
votes
1answer
880 views

How to use zsh and bash on iTerm2 at the same time?

Zsh is better than bash(obviously), but for some reason, from time to time I have to use bash. I am wondering is there any way for me to use them together without changeing them manually? What I ...
9
votes
4answers
2k views

Option + click in iTerm

In Terminal, Option + click allows me to place my cursor at any point on the current line-- great for editing really long commands. How can I do this in iTerm2? Update: According to this page, the ...
3
votes
1answer
620 views

How do I restore a previous version of my ssh keypair files?

I was following the Github tutorial and I generated a new SSH key pair. But now when I'm online, Google keeps throwing up SSL errors (and so does everywhere else with SSL, for that matter). What ...
0
votes
1answer
741 views

What is the Apple_PubSub_Socket_Render environment variable for?

After running: env ; #from with in terminal I see the following output: ... Apple_PubSub_Socket_Render=/tmp/launch-pc2V6P/Render ... What is this environment variable used for? Not really ...
1
vote
1answer
479 views

What is the TERM_PROGRAM and TERM_PROGRAM_VERSION environment variables used for?

After running: env ; #from with in terminal I see the following output: TERM_PROGRAM=Apple_Terminal ;#Not sure Terminal.app TERM_PROGRAM_VERSION=273 ;#The CFBundleVersion of Terminal.app ...
5
votes
3answers
1k views

Force Terminal to Use Gedit for any Text Editing - not vim

I'm learning to program. While following this mission, I typed git commit, which opened up vim. I don't know or want to know vim (no offense to vim lovers). I'd like to have: terminal open gedit ...
10
votes
4answers
9k views

How can I kill a process by its name?

Sometimes I notice that the process Python hung up. Then I'll kill it via the Activity Monitor and everything is fine. I'd like to kill that process in the Terminal instead. However, looking up the ...