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

22
votes
6answers
74k views

How can I list all user accounts in the terminal?

How can I list all local user accounts (whether logged in or NOT so 'users' or 'who' is no good) in the terminal on a mac? OS X version is 10.6.8. I have seen this suggested - dscacheutil -q group ...
4
votes
4answers
5k views

Creating a virtual serial port

I'm trying to create a pair of virtual serial ports on my mac. This is fairly easy to do with many shareware programs on a PC. I figured there would be some uber-powerful shell command to do this in ...
1
vote
1answer
513 views

Many programs notify me that “grep/sed/uname/… not found”; some run, some don't. My system(?) path is damaged, how do I go about a diagnosing it?

Some manifestations of this problem: macports won't install, MATLAB won't run, BTT works but incessantly spams me with " not found" popups, and emacs shell does not work. My interactive shell PATH is ...
1
vote
1answer
93 views

Sudo with Sidekick

Sidekick is a helpful little tool which adjusts the system settings based on geographical location. I added an action which will execute a sudo command-line command. The problem is that the Terminal ...
2
votes
1answer
144 views

How can I switch terminal settings using a keyboard shortcut?

Usually I need different settings in my terminal depending on what I'm working on. For example, change the opacity to see some info on the back. I think an option is to set different setting schemas, ...
22
votes
4answers
2k views

Is it possible to disable Terminal's automatic tweaking of colors in Lion?

While it's great that Terminal now has built-in support for changing the ANSI colors, I find it annoying that it automatically adjusts the colors to improve contrast, which means the colors that I ...
0
votes
1answer
56 views

Customizing the shell prompt causes some quirks

I have customized the shell prompt with the following code in my ~/.bash_profile, but there is one quirk left I can't seem to fix: export PS1="\u:\[\e[32;1;32m\W\e[m\] \$ " (code is also on github) ...
0
votes
1answer
2k views

Change PHP $PATH setting?

How to change PHP $PATH setting? I am using MAMP 2.x, my terminal for PHP command is already set to the MAMP PHP 5.3.x, but now I want to change to PHP 5.2.x I have done this before, but i forget ...
5
votes
1answer
84 views

Is kill -15 the same as File -> Quit?

I want to quit a process but without force quitting it. Is that possible from the terminal?
1
vote
1answer
498 views

Improvement to 'grep -h “BSD process name” /Library/Logs/DiagnosticReports/* | sort | uniq -c'

To track down the culprit for the frequent crashes of Lion, I ran: grep -h "BSD process name" /Library/Logs/DiagnosticReports/* | sort | uniq -c which produced: 1 BSD process name corresponding ...
3
votes
2answers
5k views

How can I add standard users to the print managers group?

I'm sysadmin for a small company; my users are on 10.6.8 (iMacs) and do not have admin rights for various reasons. The only times this is annoying is when a print job jams or otherwise does not go ...
6
votes
1answer
695 views

Force Spotlight to index a normally un-indexed folder

Spotlight only indexes a limited number of folders and doesn't index all of the files on your system. This makes sense and for the average user this usually isn't a problem. However, I recently ...
19
votes
1answer
8k views

Set iTerm2 as the ssh:// URL handler

Currently, Terminal is set to handle SSH urls. For example, if I do: $ open ssh://machine.example.com Then it will spawn a new SSH session in terminal. I'd like these to be opened in iTerm2 ...
1
vote
0answers
265 views

Signals sent to command-line programs when exiting terminal.app

When using tmux, if I CMD-W, or otherwise quite out of terminal, my tmux session persists, as it should. However, it still lists itself as "attached", whereas on other platforms, (e.g. Ubuntu) when ...
4
votes
1answer
231 views

Command line utility to create screenshot

Is there some command line utility to create a screenshot of the my screen and store it as png? (Preferably one in the system, without need to install anything new)
22
votes
2answers
11k views

How do I delete all Terminal mail?

I set up a cronjob a long time ago that now doesn't exist. Whenever I open up Terminal, it now says "You have mail". I have something like 100 messages that all say the same thing. How do I mass ...
4
votes
3answers
591 views

In terminal, modify the text that comes before $

In terminal I can always see which path I'm in: macbook-romeo:School romeovs$ echo "example command" which I find quite useful. Yet there is a lot of unnecessary stuff here too: macbook-romeo is ...
3
votes
1answer
2k views

username different in Terminal and System Preferences

I am new to Mac. Recently I realized something for usernames. When I type whoami in Terminal. It returns apple. However in System Preferences>Users and Groups" there is only one user and it says ...
2
votes
2answers
3k views

Why won't Subversion remember certificates?

I'm using Terminal and committing some data to a remote SVN server... every time I get the same message about a new certificate, and I choose to "permanently" accept the cert and it works. However, ...
1
vote
1answer
410 views

Correct syntax for bash grep function?

I'm trying to set up a function to make certain grep command easier. gr() { grep -r --include=*.\{m,h,xib\} $1 \* ; } The end result should be a recursive grep of all *.m, *.h, and *.xib files, for ...
5
votes
3answers
7k views

How do I use FTP via the command line to download all files?

I tried to use Filezilla and Cyberduck for file transfer over a simple FTP server. The problems I have is: Filezilla: When I use it for file transferring, I check the "Activity Monitor", the "% CPU" ...
9
votes
3answers
736 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. ...
2
votes
2answers
76 views

How can I add an action to search for the selected Terminal text in Google?

I want to be able to add an action to search Google with any selected text in Terminal. Any ideas?
5
votes
3answers
6k views

How can I install themes for Terminal?

I am rather new to Mac, but I am trying to get familiar with Terminal and I want to change its theme. I am a bit confused on how to go about installing Solarized themes I am seeing so much of around ...
18
votes
9answers
2k views

Case-insensitive ls sorting in Mac OSX

How can I make the ls command in Max OS X Lion sort files and directories similar to how Ubuntu Linux does (case-insensitive, directories NOT on top, dot files NOT on top)? Ideally I'd like to do ...
4
votes
1answer
720 views

Is less(1) missing lesskey functionality?

less(1), the terminal file pager, seems to be missing lesskey(1) and the ability to rebind the keystrokes in less. The docs claim it's there, but it doesn't work. Am I crazy or is Apple's version of ...
1
vote
1answer
962 views

Changed home directory of OSX Server user account, user disappeared, access remains

I'm dealing with my company's Mac Mini (with loads of data I cannot risk on an external drive, but cannot plug out because of below) running Mac OS X Server 10.6.4. My problem was that I needed to ...
2
votes
3answers
7k views

What monospace font is most legible at the smallest size?

Does anyone know which monospace font in the Terminal program or iTerm is the best to use at very small font sizes?
0
votes
2answers
818 views

How can I download a webpage to a PDF in Terminal?

I am trying to find a way to download an URL and convert it into a PDF. I have found lots of suggestions on how to turn PDFs into HTML or HTML into PDFs, but that's not the same as what I want to do. ...
6
votes
3answers
5k views

How can I manipulate several security settings from terminal?

I want to change these behaviors from terminal: Auto-login Showing password after screensaver and sleep mode Go to sleep mode after x minutes Enable screensaver after x minutes
1
vote
1answer
435 views

Map keyboard key to unix command

Simple I am looking for a way to map a keyboard key to a unix command. It could be as simple as literal as opening up terminal and pasting a required bit of text.
3
votes
1answer
3k views

Unknown terminal 'xterm-256color'

Keep getting a message in Terminal saying tput: unknown terminal "xterm-256color" This message typically appears when running homebrew, and while I can swear it's popped up on other places, I ...
5
votes
1answer
3k views

How can the 'mail' command be used?

I've had my first Mac for about five months now. Though, even when I was a full-on Windows user, I never did things through a command line; I was pretty much for the GUI all-the-way.. But now that I ...
2
votes
2answers
430 views

Run through terminal PYTHON

Is there a way on a mac to make it so when you click on a python script it runs python filename.py through terminal?
5
votes
2answers
1k views

View laptop hardware statistics

How can I return the temperatures, fan speeds, etc, using Terminal?
1
vote
1answer
2k views

BeamSync setting has ruined OSX Lion

I am running OSX Lion on a Macbook Pro. Some website suggested I put in a command in the terminal to 'increase my graphics performance' by turning off BeamSync. The command was: sudo defaults write ...
4
votes
2answers
521 views

Change the default action to open executable files in the editor instead of Terminal

When double clicking an executable file (without a file extension) in Finder, it opens in Terminal by default. I can change that to any other application for this single file, but I cannot change the ...
5
votes
5answers
7k views

How do I restore my .bash_profile?

I've accidentally overwritten my ~/.bash_profile file. Does anyone have a "sample" one I could copy, or know where I might be able to find one?
2
votes
4answers
388 views

Cannot trash a file?

I want to delete a file because it's of no use to me yet I seem unable to do so. I've gone through these steps so far: Put file in trash, empty trash. -> Mac keeps on telling me: 12 items to ...
4
votes
1answer
2k views

Search through terminal history with up and down keys in OS X Lion

After I upgraded to OS X I am not able to use my ~/.inputrc bindings to search through the shell command history: # these allow you to start typing a command and # use the up/down arrow to auto ...
1
vote
0answers
461 views

After updating oh-my-zsh prompt is weird on startup

I have been using the default installation of oh-my-zsh (robbyrussell theme) without issues. I just did a 'git pull' and now on startup I see a weird prompt. As soon as I press any key the prompt ...
4
votes
2answers
1k views

How do I maximize a window vertically? [duplicate]

Possible Duplicate: What Window Management Options exist for OS X? Is there some keyboard shortcut, mouse gesture, or add-on I can install that will allow me to maximize terminal windows ...
1
vote
1answer
250 views

Automatically change settings of Terminal when in full screen

I often use emacs from a terminal (emacs -nw), and when comparing two files side-by-side (C-x 3) it is often useful to go into full-screen mode. I'm using a 27" screen, so full-screen mode provides a ...
70
votes
5answers
118k views

Can I open files in TextEdit from the Terminal in Mac OS X?

I frequently find that a terminal command to open a file in TextEdit would be very handy. Does such a command exist on Mac OS X?
3
votes
1answer
519 views

Can you please explain how the terminal prompt works?

I've got a question about the prompt in Mac's Terminal. I opened Terminal and was installing GIT. I don't know anything about Unix or how to use Terminal, so please forgive my ignorance. (I know that ...
2
votes
2answers
971 views

How can I change the meta key on OS X Lion's Terminal.app?

Is there any way to use "Option" as the meta key in OS X Lion's Terminal.app? The checkbox that was present in Snow Leopard is nowhere to be found.
4
votes
2answers
2k views

How to clean ._AppleDouble files from unix packages?

Introduction Here's my problem. On occasion, I create the odd deb package using dpkg-deb (e.g., dpkg-deb --build "folder" file.deb). The problem is that any file with an extended attribute, carries ...
2
votes
3answers
1k views

Launch terminal in new window by default

Is it possible to set up Terminal to launch a new window by default? I recently came from running Ubuntu and I normally open hundreds of terminals a day. It's a pain to have to always right-click on ...
5
votes
1answer
346 views

Why is mdfind only returning my most recently accessed files?

I've imported most of a javascript code base via mdimport (using the packaged SourceCode.mdimporter provided by Xcode) and it succeeds. However, mdfind only ever returns to me at most two results, ...
5
votes
2answers
4k views

Firing up Terminal from an Automator Workflow?

I quite often use the python -m SimpleHTTPServer command in the Terminal to fire up a webserver for testing apps. Having just learned the basics of the Automator, I figured this would be a great use ...