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
1answer
2k views

Terminal Tab Title after SSH Session

In Mac OS X (I'm on 10.6.8, though I believe other versions are the same) ssh'ing into a remote machine changes the title of the current tab in Terminal. Annoyingly, when I disconnect from the remote ...
6
votes
1answer
5k views

Create a termnial command to open file with Chrome

I want to create command in terminal that would allow me to use chrome index.html and have the the given file open in Google Chrome. How can I get this working?
1
vote
2answers
762 views

Use Cmd as Ctrl key in vim

How can I input commands such as <Ctrl-W> and <Ctrl-]> in vim using Cmd instead of Ctrl? The reason why I want to do it is because it's more comfortable. When I need to switch to a ...
3
votes
1answer
181 views

Mac Terminal support for multiple fonts

I was trying to get emacs minimap to work on the terminal - http://www.emacswiki.org/emacs/MiniMap However, the font is the same size as the rest of the screen, which makes it pretty useless. It ...
2
votes
1answer
44 views

macos x terminal cursor is 1 posisiton righter then it should be

When I start terminal the cursor position is 1 position righter then it should be and there is a gap between last symbol and the cursor. How can I fix it?
2
votes
2answers
7k views

Terminal returns not found for most commands Mac OSX

I'm really new to Mac OSX and UNIX based systems. I wanted to run a few Windows games on my Mac Mini so I started installing Wine and MacPorts. Having done so, I typed in sudo port install wine and ...
1
vote
1answer
1k views

The Command to enter login items is not working in 10.8

I am entering the login item from the terminal but, this command is not working for me: defaults write ~/Library/Preferences/loginwindow AutoLaunchedApplicationDictionary -array-add ...
1
vote
2answers
233 views

Change ownership of all files, from one owner to another

I changed the shortname of my user account, but it seems to have caused an issue with some files (especially homebrew stuff), which are still owned by the old username. My old short name was cannyboy, ...
4
votes
1answer
2k views

Need more pseudo terminals

I'm running tmux and creating many sessions to various servers. After opening 128, I can no longer open new ones, or open new tabs in Terminal. The error messages is: forkpty: Device not configured ...
3
votes
1answer
1k views

Can you send a message across the network?

There used to be the ability, perhaps before OS X, to send messages accross the local network, which displayed a popup on the receivers machine with the message. Is this still possible? Or is there ...
3
votes
1answer
1k views

Is it possible to download Apple's Command Line Tools for Xcode from the command line?

Background My job gives me temporary MacBook Pros for travel purposes. I get them with a fresh OS install before I leave, and when I return, they blank the hard drive. The trips usually require some ...
0
votes
0answers
560 views

libicu-dev: Package not found by apt-get

I try to install libicu-dev using apt-get sudo apt-get install libicu-dev And i get the error E: Couldn't find package libicu-dev I tried apt-get update but that didn't change a thing. Fink ...
0
votes
1answer
174 views

Determine geolocation in shell / Terminal on OS X 10.5

Is there a way to determine geolocation in shell / Terminal on OS X 10.5? There's another question, Is there a way to access a Mac's geolocation from terminal? (Mountain Lion), but it seems to ...
10
votes
3answers
20k views

What steps are needed to create a new user from the command line on Mountain Lion?

What commands (or script) can create a fully functional user account on Mountain Lion, running only from the command line via terminal or ssh. It looks like an existing pair of answers might work, ...
1
vote
3answers
66 views

how to tab text blocks in terminal input line

$ I want to be able to tab from the start of one word to the next in this line, but how? usually if I paste something in the input line then want to change something in the start or middle, I have ...
3
votes
3answers
462 views

iTerm ZSH - Missing Right Prompt

I'm using oh-my-zsh and iTerm2. I've also enabled the zsh-vim-mode plugin from oh-my-zsh. One of the annoyances I've encountered is my right prompt (RPS1 & RPROMPT) doesn't seem to show up. I'd ...
4
votes
6answers
395 views

Are there any global key combinations suitable or specifically reserved on OS X for user assignment?

I'm trying to identify an appropriate global hotkey to set in iTerm2's preferences for showing/hiding it: I'd like to avoid any conflicts with other applications' hotkeys or other future use. Are ...
5
votes
3answers
911 views

After typing sudo I can no longer autocomplete commands by pressing Tab

In a Terminal, if I type beginning of any command by pressing tab I can see the rest of that command. However this feature does not work with any words I type after sudo. How can I complete command ...
0
votes
1answer
53 views

How to correctly handle two different versions running commands from Terminal?

I've download ctags from Homebrew, which was installed in /usr/local/bin/ctags. Currently I have an older version of 'ctags' which is located in /usr/bin/ctags/. I want the new version to be the ...
2
votes
2answers
94 views

When running a command from terminal, how can I know the full path of the command?

Assuming I'm writing in Terminal: 'ctags', how can I know the full path of the command 'ctags?
3
votes
2answers
2k views

I want to remove an entry in my $PATH

I'm running OS 10.8. When I echo $PATH my terminal outputs ...
0
votes
1answer
220 views

How do I view .nfo files in Terminal?

I'm trying to open an .nfo file correctly with the mac terminal (eventually with iTerm2) . I've tried it already with vim: vim file.nfo :set encoding=cp437 But it has not helped. Maybe there are ...
3
votes
1answer
147 views

How to find delay when launching new Terminal (iTerm)

When I press CMD+N in iTerm2 to bring up a new iTerm window, sometimes it takes 10 seconds before I get my prompt. If I immediately repeat the process, the whole thing takes 1 second. To me this ...
3
votes
1answer
2k views

OSX ML Terminal - Switching tabs

I am a terminal junkie and use it all the time...literally. Is there any way to be able to switch between tabs with Command+Number (eg. Command+1 for tab 1). Yes, I know about iTerm, I'm just ...
0
votes
1answer
47 views

Terminal not logged in properly

I'm having a bit of an odd issue with my terminal. I'm used to the prompt being Joosts-Macbook:~ Joost$ or something of that nature, but all of a sudden it displays a number I don't recognise: ...
0
votes
1answer
2k views

How do I change the gateway of a specific connection using the Mac terminal?

My goal is to be able to change all of the following for a specific device: IP address, netmask, and gateway. So far, I've gathered that I should be able to use ifconfig con0 10.8.0.14 netmask ...
5
votes
1answer
5k views

How do I get Wi-Fi info from within Terminal?

Is there a way to get BSSID and the list of available Wi-Fi networks from within Terminal? I.e. I'm looking for something similar to ifconfig run0 scan on OpenBSD, which lists all access points, ...
2
votes
2answers
476 views

Using cURL to download images in XML feed?

I have an XML file that has links to various .jpg I want to create an applescript that downloads a local copy of these. The idea is to also label them sequentially with a number say 001 to 030. ...
2
votes
1answer
585 views

Where should shell tools be installed?

Are there Apple guidelines for where user shell tools in Mountain Lion should be installed? Some (e.g. TeX, or Apple's Git) end up in /usr, and others (e.g. X11) seem to end up in /opt (sometimes with ...
6
votes
6answers
8k views

Improved Terminal autocomplete funcionality (similar to Matlab's)

If any of you ever used Matlab, you might have noticed the command window functionality in that program. I wonder if it is possible to enable the same functionality in Mac Terminal. It works like ...
0
votes
1answer
87 views

How to manually determine version control metadata for Finder?

I have a Scripts folder where I keep Automator actions, Applescripts, and shell scripts. Automator scripts are automatically assigned a version of 1.1.1 it seems. When I make revisions to any of these ...
1
vote
1answer
496 views

Emacs copy a paste line with comment adds extra space / line

I work in emacs in a termal tab, and instead of using the built in copy and paste shortcut commands I generally just highlight (with the mouse) to copy and paste. This works fine for normal ...
5
votes
3answers
10k views

Merging Multiple CSV Files without merging the header

I need to merge multiple .CSV files (using the cat command) but without copying the header for each file. What's the best way to accomplish this task?
1
vote
1answer
63 views

Make meta + arrows count underscore as words?

I find myself using the meta + arrow keys constantly. When I am editing code, it would be nice if I could count underscores as words so that when I decide to rename a variable it goes to the ...
3
votes
3answers
3k views

How can I use Terminal to copy all files of a certain type from a failing hard drive?

I need to use terminal to copy my Pictures folder from a failing harddrive onto another drive, but I can't actually change into the folder and use just cp *.jpg ~/Documents. Is there a way to do this ...
3
votes
3answers
3k views

Dig not returning authority section?

Digging wikipedia.com, on my Macbook Pro, returns: $ dig wikipedia.com ; <<>> DiG 9.8.3-P1 <<>> wikipedia.com ;; global options: +cmd ;; Got answer: ;; ...
3
votes
1answer
308 views

Reload menu bar from terminal (not SystemUIServer)

I am looking for a way to reload/refresh the "apple symbol" menu in the upper left corner from the terminal. Searching for ways to refresh the menu has only led me to find the command killall -KILL ...
1
vote
1answer
436 views

Permission denied error when opening Terminal

I'm using a clean install of 10.8. I wanted to add a couple of directories to my path. I tried adding them to /etc/paths using sudo vim /etc/paths Now when I open a terminal window I see this: ...
2
votes
1answer
190 views

Downside of manual shutdown

I've been using shutdown -h now in the terminal to turn off my iMac (sooo much faster than waiting for every program I use to close out), and I wondered if there were any downsides to shutting down ...
0
votes
1answer
2k views

Access applications and their folders from terminal

I have a folder that I want to init with git, but to do that I have to 'navigate' to that folder using cd. The problem is when I write cd Applications, that folder is empty and I cannot go into ...
4
votes
2answers
7k views

Editing System Preferences via Terminal

Am looking to edit system preferences settings via the command line but cannot for the life of me find the correct names of variables. In Login Options under Users & Groups, I would like to be ...
0
votes
1answer
774 views

How to add a script that types in the password for my vps through applescript

I made a script recently and have turned it into an app, it basicly logs me into my vps via ssh but I don't know how to tell it how to type in my password for me, heres the code tell application ...
0
votes
1answer
317 views

Set Keystroke for Service from Terminal

I created some services to be used in Finder. Now I wanted to create some keystrokes to call these services. That would be easy in the System Settings, however, I would like to add them from the ...
0
votes
1answer
300 views

Execute command on launch of custom Terminal Window in OSX10.5+

I'm trying to find a way to automatically launch a command when Terminal is run, but: Have the Terminal window close after command has returned control to it / after (using &) after command has ...
5
votes
4answers
6k views

How to reset $PATH?

I was trying to add something to $PATH and it went totally wrong. I now can't run any commands such as ls. I've looked at this answer and used the following lines: ...
2
votes
1answer
1k views

Editing war file with Midnight Commander

I'm trying to edit the contents of a war file on midnight commander (Mac OSX). With a normal zip file, this works fine. However, when I try to open a war file, I get an error message: gzip: stdin ...
0
votes
1answer
180 views

TimeMachine restore issue

Times ago I did a "restore from time machine backup" in order to restore all my files on a new SSD I bought for my macbookpro (with OSX Lion), and all went fine. Today I installed Mountain Lion on ...
2
votes
1answer
1k views

What terminal is the Mountain Lion Terminal app emulating?

I recently migrated from 10.6 to 10.8. I use Terminal to connect to various linux boxes where the TERM variable is observed to be xterm-color. This seems to be consistent with the 10.6 setting of ...
0
votes
1answer
414 views

Unable to ping any website through terminal and network utility

I have internet connection and I can access every website. But when I try to ping any website ( be it www.google.com or www.stackoverflow.com or any site ) I always get Request timeout for icmp_seq 0 ...
0
votes
3answers
417 views

Permanently show hidden directories

I am trying to repair a friend's USB drive that got a virus. All directories became .lnk and the original ones were hidden. I don't know how to permanently show the folders. I've used sudo chflags ...