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

5
votes
1answer
3k views

Move to Start of Line in Terminal.app

Is there a quick key combo that will allow me after typing some stuff in the OSX terminal to move back to the beginning of that line? I have tried different things, and was wondering if there is a ...
5
votes
1answer
2k views

Is there a way to force Mac OS X to close all the applications when restarting?

I sometimes shut down my Mac, and I cannot wait it shuts down because I am urgently requested to do something in another office that would require some hours. In some cases, an application that opens ...
5
votes
2answers
368 views

Command to close terminal window

When I want to close a window I type exit : mbp-thomas in ~ ○ → exit logout [Opération terminée] Then cmd + w to close the window. Is there a way to do it with a little script like if I type ...
5
votes
1answer
2k 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?
5
votes
2answers
464 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 ...
5
votes
3answers
4k 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 ...
5
votes
3answers
4k views

How can I add a path to the PATH environment variable?

I want to add a path to the PATH environment variable? I have tried with export PATH=/mypath:$PATH and it works. But the next time I start the Terminal, my new path is not int the PATH environment ...
5
votes
3answers
6k views

Where are bash profile startup files?

I know that you can have a .profile or .bash file in your home folder to customise Mac OS X 10.6.4 Terminal bash startup. Every time I start up Terminal, there is a line that tells me "You've got ...
5
votes
1answer
152 views

How to launch TextMate (and probably other software) from the command line?

I am very new to Mac, coming from Linux. I am using TextMate, and I suddenly discovered I do not know how to launch TextMate from command line. Using completion, nothing looks like TextMate. Where ...
5
votes
3answers
6k 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?
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 ...
5
votes
2answers
532 views

Terminal doesn't show badge - how to enable?

Opposite to another question here I want the badge count to appear. I have the "resume" function enabled in my Lion. Is there another setting that's responsible for the badge? To clarify I run tail ...
5
votes
1answer
3k 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, ...
5
votes
2answers
458 views

How can I have my shell always start in a certain directory that is not my home directory

I've tried putting cd /Users/my_name/my_directory/structure in both .bashrc and .bash_login but neither works, i.e. when I open a new terminal window I am in my home (/Users/my_name/) directory. ...
5
votes
1answer
380 views

Parental Controls not restrict Terminal Commands?

I have a Parental Controls limit on my child so I have to type in my password when they open a new application. I have recently discovered a problem though. They have tried programming in terminal. ...
5
votes
3answers
3k 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
5
votes
3answers
2k views

Opening a terminal window to a specific directory from a bash script

How can I write a bash script in Mac OS X that opens a Terminal window in a specific directory? I'd assume something like: open /Applications/Utilities/Terminal.app But that does nothing (maybe ...
5
votes
1answer
386 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?
5
votes
1answer
1k views

How can I tell which volume the operating system is on?

I'll admit that I am kind of rolling multiple questions in to one here so please forgive me and try not to knock me for it. I am new to Mac but I'm trying to port one of my Java applications to OS X. ...
5
votes
2answers
767 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.
5
votes
1answer
80 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?
5
votes
2answers
3k views

Linux 'Byobu' equivelant for mac

So at home ive been a linux user for a while, and frequently use byobu in the terminal. After a little searching I was unable to find anything like it for a mac, which I now have to use at work. I'm ...
5
votes
4answers
3k views

Alternatives to command line unzip?

I've found that the command line unzip tool doesn't gracefully handle some of the files I'm unzipping: it makes a bunch of junk directories, and creates files whose resource forks aren't found. ...
5
votes
4answers
1k views

Automatically quit Terminal when typing exit

Scenario I use terminal to SSH a lot, however would like the Terminal App to quit when the last Tab closes using exit. I already have the terminal window itself set to close on successful exit, ...
5
votes
2answers
748 views

What does -HUP do when used with killall?

Sometimes when I'm running a killall command from Terminal, a co-worker would suggest or edit my scripts to show killall -HUP. What does the -HUP part do?
5
votes
2answers
7k views

How to move the Downloads folder (in Mountain Lion) to another disc

I want the "Downloads" folder not on the system drive but on my second internal drive. In Lion I just deleted the "Downloads" folder and replace it with an alias with the same name (pointing to the ...
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 ...
5
votes
4answers
610 views

Newly Installed App (gem) Via Terminal, Path?

I have used sudo gem install to install a few gems. My question is how do I know where the executable was installed, so I can add it to the path in .bash_profile?
5
votes
1answer
3k views

Turn on Back To My Mac via a Script or Command Line

The VPN software I use for work (IPSecuritas) requires me to turn off Back To My Mac to start it's connection, so I frequently turn off Back To My Mac in order to use my VPN connection (the program ...
5
votes
2answers
171 views

How can I launch a GUI app in Applications folder from command line?

I would like to launch a GUI app that is in the Applications folder from the command line as opposed to clicking the icon in the Finder or in the Dock. The reason I want that is to be able to launch ...
5
votes
1answer
99 views

Weird line wrapping in terminal with a colored prompt

I have reason to think I've got improper escaping in my bash prompt (I get weird random line wrapping in Terminal). Can anyone point it out? It looks OK to me... export PS1="\033[0;35m\u\033[00m on ...
5
votes
1answer
10k views

Installing .pkg with terminal ?

Is it possible to install a .pkg using a terminal ? (I wanted to install an app through ssh).
5
votes
1answer
3k views

Where are the Terminal settings stored on OS X?

You'd think A) I'd know this by now, and B) that it's readily available info, but apparently neither is the case. What I'm looking for is where the config files (colors, etc.) that ship with ...
5
votes
3answers
2k views

Is there a way to remotely restart Finder (or wake-up the desktop) from SSH?

Over the last few months I've found my MacBook Pro is getting increasingly unwilling to wake-up if it's gone to sleep of it's own accord - not when I put it to sleep deliberately, but when the machine ...
5
votes
2answers
590 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 ...
5
votes
2answers
948 views

Strange message in terminal when visiting a website

I have my terminal open most of the time. Today while I was searching for a software, search results took me to http://download.cnet.com. I didn't like the software, closed the page and carried on. ...
5
votes
1answer
378 views

I got an image on terminal from the output of homebrew package manager

I got a strange image from the output of brew like this . I'm curious about this behaviour. Is this a feature of brew or the image comes from some special character set? If a character in some ...
5
votes
2answers
658 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 ...
5
votes
1answer
301 views

How can I open a new customized (color, font, etc.) Terminal window from the command line?

I'd like to open a new Terminal window in Terminal.app. I'd also like to be able to customize this window (color, text, etc.), based on one of my pre-defined defaults, or based on something else not ...
5
votes
1answer
2k views

How do I make ⌘← and ⌘→ work for home/end combo for Terminal?

Why does fn-⇧-→ (or others) do a home/end in Terminal but a ⌘-→ works everywhere else? So just to be clear the question is how to make Terminal take Command + ← and → for home and end?
5
votes
2answers
872 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 ...
5
votes
5answers
4k 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?
5
votes
1answer
15k views

How do I remove a user via single user mode in 10.7?

I occasionally will setup a user's machine that has been in for repair beyond the simple re-install of the OS. For example: install a new hd, install the OS, create a user, install updates and then ...
5
votes
2answers
3k views

Is there a usable iOS4 Terminal App?

Mobile Terminal 426 appears to be the only non-crashing iOS4 Terminal App. Unfortunately it's missing all of its convenience features, like gestures. Are there alternatives?
5
votes
1answer
46 views

How to use Terminal to send Keystrokes?

Is there a way for Terminal to simulate pressing multiple keys at once? For example, Shift + Ctrl + R? I am ssh into OS X from a windows client (PuTTY) and am wondering if I need to configure the ...
5
votes
1answer
292 views

How do I run this command in verbose output mode?

I want to update my OS X Mavericks USB key and would like to be able to see what my mac is doing after I enter the following command. sudo /Applications/Install\ OS\ X\ ...
5
votes
1answer
258 views

How to enable Three Finger Drag from command line

I'm trying to write a shell script that will automatically set the trackpad to use the three-finger-drag option that you can find in the system preferences. I've tried a number of different things, ...
5
votes
1answer
121 views

Launching certain programs on startup in their own fullscreen space

When I login I want a blank desktop in my first space, sublime text in my second space, chrome in my third, and terminal in my fourth space like so:
5
votes
1answer
1k views

Best rsync options to transfer data between two Mac

I am about to move my data from my old iMac to a brand new MacBook Pro. I would like to start over with a fresh install on B and copy just a subset of my data, reinstalling applications from scratch, ...
5
votes
3answers
3k 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: ...