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

4
votes
3answers
652 views

pbpaste, pbcopy using wrong pasteboard?

I'm converting a shell script which xclip and similar tools on Linux, to use pbpaste and pbcopy on Mac. The problem is the default pasteboard ('general' according to the man-page) for these tools is ...
2
votes
2answers
1k views

Unable to save hosts file after adding websites to block.

I'm unable to save hosts file after adding websites to block,as well as unable to flush cache. I am not a techie, just researching on the web, and trying to follow directions for terminal and Text ...
3
votes
3answers
375 views

Any way to force command line terminal to control a Mac?

I'm experimenting a little with Automator at the moment and often get stuck with some pre-recorded automation running very slowly while the whole Mac (an 2010 iMac in my case) doesn't respond to any ...
11
votes
2answers
2k views

How do I find the windowid to pass to screencapture -l?

The command line utility screencapture claims to be able to capture a single window without requiring interaction, but I can't figure out what to pass it. -l<windowid> capture this windowsid ...
3
votes
4answers
3k views

How to list all files in directory excluding any that start with a dot?

I'm currently using the command find /Volumes/DriveName > driveName.txt to create a file listing of all files that are on the drive. How could I modify my command (or what would be a better ...
1
vote
2answers
3k views

Change label on USB drive in OSX Terminal

I am trying to write a program in Python that will rename a USB drive (from the standard "USB DISK" to my custom "MYDISK"). However, I can't find any way to do this neither in Python nor in OSX ...
4
votes
1answer
6k views

How can I move Dashboard widgets to the desktop in Lion?

In the OS X Terminal, there is a command that allows me to drag Dashboard widgets onto my desktop. In OS X Lion, the Dashboard became a Space. I am no longer able to use this command. What is a ...
2
votes
1answer
186 views

Why does my terminal show a string like this?

When I open my terminal it shows this: wpa-2-602:~ david$ I just curious what the wpa-2-602 means? "david" is my user name, and sometimes it was something else. What makes it change?
10
votes
4answers
3k views

iTunes track notifications for Mountain Lion

In OS X Lion there was the preference (via a Terminal command) to enable iTunes track notifications that were displayed as a popup in the dock. So far it seems as though Mountain Lion does not allow ...
6
votes
2answers
881 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 ...
0
votes
3answers
1k views

Change owner for all files owned by x

I copyied files from my MacBook, mainly files from /usr. The one and only user on my computer is called 'Julian' (like on my MacBook). A lot of the copied files are now owned by '501' (id of "Julian" ...
1
vote
1answer
347 views

Search all hidden .htaccess files inside a folder and run a terminal command?

Searching for the issue, I found this Q&A: How can I show only an .htaccess file in the Finder? [...] you could create a symlink to the file in its directory, omitting the dot in the name: ...
54
votes
3answers
21k views

git auto-complete for *branches* at the command line?

On my linux machine I have autocomplete for branches with git. For example I can type git checkout [TAB] and get a list of branches. Or I can type git checkout feb* [TAB] to get all branches that ...
1
vote
2answers
477 views

How do I disable DVD player auto start when a DVD is inserted by using Terminal

If anyone can help me with this it would be the best! I have just installed 150 Mac minis in a hotel and I'm using remote desktop management to control them. Now I need to disable DVD player auto ...
0
votes
2answers
721 views

Executing program through Terminal

I have Sage (math program) and I want to execute it through terminal. I know I can go to the directory and execute it with - open Sage.app But would I really want to do is simply type sage in ...
2
votes
1answer
532 views

Why doesn't the screen command source my .profile?

When I start a new screen, the aliases that I have set in my ~/.profile do not seem to be sourced. Does anyone know where I can change this or which file is actually read when starting a new screen?
2
votes
1answer
2k views

Is there a way to get gnome-terminal on Lion?

Is there a port of gnome-terminal, or a way to compile it, or some other program that is typographically comparable, under Lion? There is a typographic difference, and I can't duplicate it in ...
6
votes
1answer
339 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?
11
votes
2answers
1k views

cd to a directory by typing its name?

For example if a directory 'blob' exists and I just type 'blob[return]' then the system cds into the blob directory for me. In Linux (Ubuntu) I can add shopt -s autocd to my .bashrc file, but on OS X ...
1
vote
3answers
7k views

Where can I find gcc in Xcode 3.2.6?

I have a Mac with OS X 10.6.8 Snow Leopard. I'm trying very hard to learn the basics of programming in C, but I can't get my first simple program to run. I read online to go to Xcode Preferences -> ...
0
votes
0answers
293 views

How to make the display go to sleep mode when Lion's Terminal.app is in full-screen mode?

I've noticed that when I'm running a full-screen Terminal.app in Lion, the display does not go to sleep. This left me with a nasty case of burn-in over the weekend with a magenta message box from an ...
5
votes
2answers
1k 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 ...
3
votes
3answers
19k views

How do I delete a BootCamp partition using Terminal's diskutil?

For some reason, the BootCamp Assistant app won't let me delete my BootCamp partition. How can I do so using Terminal and the diskutil terminal app?
4
votes
1answer
4k views

Does the “purge” command damage any thing in my system?

I am using OS X 10.5.8 and in spite of having 5GB of RAM memory, I face a lot of inactive RAM, and go to the terminal and purge it via the "purge" command (of course without quotes). I do this almost ...
1
vote
2answers
91 views

Hold Terminal open

Sometimes I'm working on something in the terminal, and then go away. When I come back, I want to resume what I was working on, but sometimes I forget, and hit command-Q, which closes all the terminal ...
3
votes
2answers
376 views

How can I change Terminal so that I don't have to press ESC every time I want to type a meta-modified key?

Currently in emacs/terminal, I have to press ESC every time I want to send an escaped keystroke, eg: to go forwards two words, I have to press: ESC+f; ESC+f How do I change the system so that I ...
0
votes
1answer
1k views

How can I have Qt Creator to recognize my environment variables?

I use Qt Creator as my main IDE for cross-platform C++ application development. In doing so I had set it up so that it depends on a set of environment variables that I define in .bashrc. On Linux ...
2
votes
2answers
944 views

What is the equivalent terminal command to findsmb on Lion

The findsmb command present in SnowLeopard and older, is not available from terminal in Lion. Is there an equivalent?
0
votes
2answers
260 views

How do I make a terminal alias that edits root owned files in a GUI text editor?

How can I quickly edit root owned files like /etc/hosts and /etc/apache2/httpd.conf in a text editor such as TextEdit which would let me do modern text editor operations, without actually running the ...
1
vote
1answer
1k views

How do I get a Unix Executable File to run from anywhere, like Java or Git?

I've just created my first Command Line Tool in Xcode. What do I have to do, or where do I have to put the final output file, so that I can run it from anywhere from within terminal, without having ...
4
votes
1answer
396 views

In terminal, how to get “say” to say things “right” ? ie using custom phonetics?

I'd like to use "say" in the terminal to create audio files with a custom phonetic dictionary, or at the very least, say things how I think they should sound. From my understanding, this can't be ...
8
votes
4answers
6k views

Waking display from terminal, general waking

This is a two part question. A practical, "how to" question is first, and then I ask for configuration suggestions. First, I put my displays to sleep at night, and I would like to be able to wake ...
2
votes
0answers
256 views

Multi node cluster setup with home network for parallelized computing using e.g. hadoop, MPI or Rmpi

currently I am reading more and more about multi-core processing (threading) and parallel computing. So I was curious about how to use my 4-core processor to calculate parallelized algorithms using ...
5
votes
1answer
418 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?
1
vote
2answers
5k views

Built-in text editor in Terminal

Is there a built-in text editor in the terminal on Lion? (Like, for example, nano on Linux.)
2
votes
2answers
149 views

Geeky terminal for OS X

I want to bind a certain command to show a terminal on screen without window frame with the command of my choice. I plan to use it to quickly launch network monitoring tools (trafshow) when I use a ...
1
vote
2answers
414 views

Help me determine what runs when I open a new Terminal window

I noticed that when I started a Terminal window by accident and tried to close it quickly by pressing the X on the window, I got a dialog box like this: "Closing this window will terminate the ...
4
votes
2answers
178 views

Is there a list of commands unique to the OS X terminal?

I tend to find out about unique OS X terminal commands piecemeal. As problems arise, or as I read askdifferent, I'll find out about handy things like mdls and mdfind. Is there a place that lists all ...
2
votes
3answers
3k views

Why does sudo ask for a password in terminal?

Why does sudo ask for a password when one can sudo su without a password and perform the same commands? Is there a way to make sudo not ask for a password when you're logged in as the an admin anyway? ...
1
vote
1answer
363 views

How to add a directory to my path that includes a colon and a space?

I installed MIT/GNU scheme and am trying to add the directory to my $PATH variable so that I can run it from Terminal. The app name MIT:GNU Scheme.app is a veritable "perfect storm" (for path names) ...
3
votes
1answer
452 views

Automating terminals at startup

Is there any way to automate a bunch of terminals starting up at once. I find myself opening several windows and running the same sequence of commands in various tabs. I'd like to stick all this in a ...
3
votes
1answer
193 views

Changing the range of addresses served to clients connected via Internet Sharing

Macbook Pro Running 10.7.4 attempting to share ethernet connection via Airport(Wi-Fi) and trying to serve 192.168.1.x addresses to connected clients. I've tried the guidance provided here and the ...
8
votes
2answers
30k views

How to save and exit “nano .bash_profile” in Terminal?

I need to add some line to nano .bash_profile in Terminal. Then: 1) I enter with this command line: nano .bash_profile 2) Add the line I need 3) now I don't know how to Save and Exit I thought it ...
12
votes
1answer
1k views

Terminal move cursor with mouse in any way?

Is there any way at all to use the mouse cursor to move the cursor in terminal, like click where you want it and press a key to move it there? This is one of the most annoying things I've ever found ...
0
votes
1answer
346 views

pasting commands from TextWrangler to Terminal (applescript troubleshooting)

I have a following script that I have been using for years to paste selection or a whole line from TextWrangler to R. I got it from some website, slightly modified, and it has worked perfectly: tell ...
2
votes
3answers
263 views

Script to move files under their first letter name

i've a lot of files (1000+) in a single directory, and i would like to organize them into sub directories, according to their first letter. So i've 200 files starting with A, and i would like to move ...
0
votes
1answer
535 views

Running (Perl's) CPAN in OS X: error “Can't open perl script –MCPAN”

All the instructions I can find for running CPAN on Mac OS X (eg. 1, 2 & 3) say to start by running this command in terminal: sudo perl –MCPAN –e shell However when I do so I get this error: ...
-4
votes
3answers
13k views

How to press Control key on Mac

I cannot seem to find out how to hit the ctrl key on a Mac. When I open a terminal and I want to exit an editor such as nano as I cannot since I don't know how to exit and save. How would I do this? I ...
4
votes
1answer
377 views

Why does my Terminal command line screw up like this? (bash's fault?)

When I use the command line history ( CtrlR , CtrlP ) The command line screws up like this: The cursor is supposedly located at the end of the line ( just pressed CtrlE ) If I press enter, just ...
3
votes
1answer
368 views

How do I find where an environmental variable got set?

I installed a program to try it out, and decided I didn't like it so I moved the app to the trash. Today, in my shell, I noticed that there are a couple of PROGRAMNAME_BLAHBLAH environmental ...