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

2
votes
5answers
4k views

In Terminal, can I find out the current Finder folder?

It is commonly asked how to get a Terminal prompt from a Finder window. I am asking the opposite. I would like a command-line way of determining the working directory of the "current" Finder window. ...
7
votes
1answer
7k views

Are there any keyboard shortcuts to switch between tabs in terminal?

Are there any keyboard shortcuts to switch between tabs in terminal?
3
votes
2answers
668 views

SSH Key Error, sudo works fine

When I try to ssh (using ssh user@server.com) into my server at home from either the local network or from outside, I get the following error: But if I use sudo ssh user@server.com, it works with no ...
3
votes
1answer
78 views

Order of parameters for command-line tools [duplicate]

Possible Duplicate: Can command-line commands be made insensitive to order of filenames and options? It looks like the OS X built-in command line tools, such as ls, du etc are rather strict ...
0
votes
3answers
257 views

grep syntax issue on Lion

I have a text file and looking for the single line bird. Using OS X Lion and grep 2.5.1. this works: grep '^bird' file.txt but this doesn't grep '^bird$' file.txt There is not a blank space ...
1
vote
1answer
2k views

Setting a static route every boot with launchd / plist is failing

I hope to use launchd to set a static route on a server at boot time since I haven't figured a better way to configure this sort of networking on a server. My problem is that the command seems to be ...
1
vote
1answer
1k views

How can I press escape on a Bluetooth keyboard with my iPhone?

I sometimes use a BlueTooth keyboard with my iPhone, which is lovely for writing emails, but I run into difficulties when using terminal on the iPhone - I like to edit files with vi(m), which requires ...
5
votes
2answers
616 views

Strange behavior in Terminal with custom .bash_profile

It's hard to describe the behavior, but here's a short clip: http://www.youtube.com/watch?v=9KqHBA94FPI Basically, when entering multi-line commands, at the end of the first line, the insertion ...
1
vote
2answers
905 views

What is your preferred way to start a (shell) script from the GUI?

I was wondering what ways there are to start a (shell) script from the GUI, e.g. double-clicking an icon in Finder or launching via Spotlight. This is not about opening a terminal and "manually" ...
15
votes
2answers
9k views

How can I prevent an SSH session from hanging in OS X Terminal?

When I close my MacBook with an active SSH session in Terminal and then wake it up, the prompt goes unresponsive. In about five minutes it says Write failed: Broken pipe and terminates. This ...
2
votes
2answers
218 views

Where do these Terminal commands come from?

I don't know any specific term for these Terminal commands, so i want to give an example: defaults write com.apple.dock itunes-notifications -bool TRUE With this command, you can enable an ...
3
votes
1answer
1k views

List of (activated) fonts with shell command in os x

Is here any shell command for getting the list of activated fonts? Mean something like: some_font_util -activated -format 'file: name' for getting a list of activated fonts in a form: ...
0
votes
3answers
3k views

ssh/terminal tricks with iPhone [closed]

I have a lovely jailbroken iPhone 4. Works fine. Very much enjoying being able to ssh into the device, but I can't help feeling I'm missing a few tricks with the ssh, would anyone be able to point me ...
18
votes
10answers
9k views

How can I sleep the display from Terminal?

I'd like to be able to turn my screen off from command line. I know there's the keyboard shortcut ctrl+⇧+⏏ but I want to do it from a shell script or remotely. Is there a way?
2
votes
1answer
3k views

Turn on bluetooth via terminal/command line

How can I turn on bluetooth via the terminal / the command line?
5
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 ...
3
votes
3answers
612 views

Enable full-screen mode for applications on Lion

There some applications which I can not yet run in full-screen mode. I particularly would need the OSX Terminal app and possible the TextEdit. However, after the upgrade they remained the same, and ...
0
votes
1answer
2k views

How can I replace the nmblookup command on Lion? [duplicate]

Possible Duplicate: Where is nmblookup in Lion? In Snow Leopard, I used to use the command nmblookup -U 172.16.0.10 -R domainPC | grep '<00>' | awk '{print $1}' Blindly upgrading to ...
4
votes
2answers
258 views

loosing vi mode in terminal

My favorite text editor beeing VIM made me add the follwing line to my ~/.bashrc set -o vi As expected, hitting escape lets me execute a vi command, BUT ONLY ONE ?!? For example if I do this: ...
0
votes
3answers
761 views

Make vim read the vimrc from ~/.vim/vimrc

This may not be the best place to ask this question but I'm having trouble getting vim to read my vimrc file. If I have it in the home directory as ~/.vimrc then it ready just fine but if I move it ...
5
votes
2answers
665 views

Smarter Bash Tab Completion

As a recent switcher from Ubuntu (Well recent switch backer if that's a word) I'm finding myself in the command line a lot more than when I was a mac user before. One thing I really loved about Ubuntu ...
8
votes
3answers
8k views

How to hide computer name and user name in terminal command prompt

How can I hide username and computer in terminal command prompt? In Terminal it says Last login: Mon Jan 13 00:00:14 on ttys000 Whatever:~ UserName$ Is it possible to show just the current ...
8
votes
3answers
4k views

How can I dim the screen from Terminal?

Is it possible to dim the screen from Terminal, in a Mac with OS X Lion? Is there any command to do control brightness and volume?
3
votes
1answer
140 views

Where is running terminal program scrollback located

I had multiple terminal programs running at same time and Terminal stopped responding. Now I wonder if there is any chance to get those session output/scrollback files and save them.
9
votes
2answers
5k views

How can I delete saved commands from Terminal?

As all of you know, Mac OS X stores all commands that run from Terminal in Terminal itself, however, I want to delete (for example) the last 3 commands from the terminal. How can I do this?
5
votes
2answers
475 views

Is there a UNIX-style triple click to select path in Terminal.app?

In Red Hat, if there is a path somewhere on my terminal window and I triple click it, the whole path is selected. I can then easily copy it using middle-click or a regular copy-paste. This doesn't ...
1
vote
2answers
6k views

Running terminal commands on startup/login

How can I run terminal commands on startup or login? On FreeBSD I believe you can do this using rc.d - is there an equivalent for the Mac? I know how to set up Login Items, but these only work for GUI ...
6
votes
2answers
659 views

Terminal behaving differently since updating to Lion

Ever since my company updated to Lion, terminal.app has been behaving differently. When I click on the dock icon, it sometimes opens several terminal windows at once, instead of a single one, and all ...
3
votes
4answers
567 views

Setting time format preference in unix (Mac-Terminal)

I'm learning to work in unix using Terminal on a Mac and I'd like to set the default listing for the timestamp to display in 12 hour time, using AM and PM, instead of 24 hour time (ie: 1:00 PM, not ...
10
votes
4answers
2k views

Can a Terminal window be resized with a Terminal command?

So that I could resize the window to a certain size from within Terminal.
0
votes
2answers
443 views

How would I restore Spotlight search to my menu bar? (10.7)

For some inexplicable reason, I decided to delete (not hide) Spotlight from my Mac via a terminal command. I downloaded the 10.7.2 update, hoping it would fix this by redownloading Spotlight, but it ...
8
votes
2answers
2k views

How do I change the location of screenshot in OS X Lion?

The old method that works for Leopard/Snow Leopard doesn't work any more on Lion: defaults write com.apple.screencapture location /Users/kamus/Pictures/snap Has something changed or does anyone ...
25
votes
6answers
58k views

Is there an OS X terminal program that can access serial ports?

What programs can act as a terminal and access serial ports? This is not for terminal access on an IP connection, this is so I can access a hardware device plugged into a USB/serial converter running ...
4
votes
3answers
4k views

How can I remove Firefox using terminal?

I'm a beginner with Mac OS X. Would somebody please tell me how to fully uninstall Firefox using Terminal on Mac OS X Lion? I'm experiencing hangs and crashes with Firefox 5.0.1, so I want to remove ...
2
votes
1answer
1k views

nvram -p… strange results

I am having problems running the /usr/bin/purge commands on my iMac with Lion since the last upgrade. Someone suggested me that I may be running in safe mode and asked me to type "nvram -p" on ...
2
votes
1answer
627 views

How can I kill or refresh Desktop Wallpaper with a Terminal command?

Is there a command for refreshing the Display Settings? Or, in specific, refreshing the Desktop Wallpaper?
1
vote
2answers
601 views

How do you list items with and without labels from the terminal?

Is there a command that can tell the label status (labels as applied in the info menu in the finder cmd+i) of an item from the command-line in OS X? Essentially, I just want to list all the items with ...
3
votes
1answer
3k views

How do I create a new user in Lion from the Terminal?

The older method of: dscl . -create /Users/username doesn't work because /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist can't be found. From what I gather, OSX Lion doesn't use ...
8
votes
2answers
3k views

How do I reset the scrollback in the terminal via a shell command?

When using Terminal.app, you can clear the screen by using the shell builtin clear or by pressing ^+L (Control-L). However, all this does is push the current screen content back one screen height ...
7
votes
2answers
1k 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 ...
0
votes
1answer
1k views

How can I run iPhone app in Simulator without opening Xcode using command-line utility

I know that there are some utilities which allows us to install iPhone apps to Simulator. But I found problems installing in this way when I have two Xcode versions installed on the system. I want to ...
0
votes
1answer
957 views

Mount root of SMB Server

I have a Windows server that I want to backup all the Shares through a script automatically to my MacBook Pro running OSX 10.6.8. There is no common folder all the shares are in, they are just mounted ...
1
vote
0answers
93 views

My hostname is now out of sync

My hostname got out of sync with what it is set to in System Preferences - Sharing. From what I've read this is most likely related to a router having the ability to update my hostname. Anyhow, I've ...
0
votes
2answers
154 views

Gnu-info page exists, but is visible from neither emacs nor terminal

After installing gnuplot on Lion using 'brew gnuplot', the gnuplot info page appears at /usr/local/Cellar/gnuplot/4.4.3/share/info/gnuplot.info But in the info index page (M-x info) in emacs, I see ...
4
votes
1answer
726 views

Accented characters and terminal redirection

I'm having problems dealing with accented characters in file names in the Terminal. Consider the following: $ touch leão.png $ ls > test.txt $ open -a TextWrangler test.txt The accented ...
3
votes
4answers
550 views

How do I gain permission to generate ssh keys on my Mac?

I tried to generate ssh keys for GitHub (access through SSH in terminal), but I do not have access to the .ssh directory. I tried to ls -l ~/.ssh, but I got this error ls: .ssh: Permission denied I ...
2
votes
2answers
3k views

How can I exit “bash”?

I don't know how to get my .profile aliases back in to the terminal every time I try them, this error massage comes up: apaw:~ apaw$ cdp -bash: cdp: command not found How do i exit this -bash? I ...
0
votes
2answers
3k views

How do I use arguments together with bash aliases

Today, I learned the very handy trick: man [some command] -t | open -f -a Preview I'd like to create an alias in my .bash_profile file as a shortcut. In order for this to work, I need to pass an ...
0
votes
1answer
277 views

How can I make my Terminal login as my mac account and now bootcamp partition?

I recently installed windows 7 on a partition using bootcamp and all went well. Now i am trying to use terminal on my original mac partition on OSX but the command line comes up as: myusername-Win7:~ ...
12
votes
3answers
8k views

Where will the incident with the sudo command be reported to?

If a non-admin types a sudo command in Terminal, this will appear after they enter their password: User is not in the sudoers file. This incident will be reported. Where is this reported to?