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

6
votes
3answers
270 views

Terminal command to bring up shutdown dialog?

I know how to shutdown a Mac from Terminal, but is there a way to actually bring up the shutdown dialog you get from Apple → Shut Down…?
6
votes
1answer
2k views

Completely clear all output from a Terminal window

I would like to clear all output from a Terminal window (including all historical output) to get it back to a clean state as if you had just opened a new Terminal window, or a new Terminal tab. I can ...
6
votes
2answers
696 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. ...
6
votes
4answers
1k views

Is there a better way to shutdown/restart OSX?

Whenever I want to shutdown/restart OSX I click on the menu, select shutdown, and then click the box for not saving the session, and then click OK. Then there's always at least one program that ...
6
votes
2answers
16k views

Installing .pkg with terminal ?

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

Set default shell to MacPorts bash in Mac OS X 10.6.8?

As a follow up to my previous question, I reinstalled my MacPorts and want to try its newer version of bash again. I installed the newest bash via MacPorts on my Mac OS X 10.6.8 system, but when I ...
6
votes
1answer
444 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?
6
votes
3answers
4k 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
6
votes
3answers
222 views

Moving folder to Trash in Finder is not synchronized with Terminal

I tried to delete a folder which I access via terminal.app. Though the Finder moved the folder to the Trash, I was still able to see the contents and edit the file from terminal. created a textfile ...
6
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 ...
6
votes
1answer
1k views

Terminal: Application Not Responding

A few days ago, Terminal.app suddenly stopped working. Whenever I open it, the little light below the icon in the dock turns on (and stays on), but no window appears. When I right-click the icon, I'm ...
6
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 ...
6
votes
2answers
770 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 ...
6
votes
3answers
1k views

How do I make symbolic links invisible in the Finder?

I use SetFile via the terminal to render files and folders invisible inside Finder windows. This does not appear to work on symbolic links: the symlink destination is made invisible, rather than the ...
6
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 ...
6
votes
3answers
4k views

Script to raise a single window to the front

In a script I'm trying to find the Terminal.app window containing a specific tty device and raise that window to the top. Here's what I have in Applescript so far: tell application "System Events" ...
6
votes
3answers
477 views

How to remove .DS_Store from command-line auto-completion using cd?

I understand that .DS_store files serve a purpose. That said, they are a nuisance when auto-completing with the cd command. When I type cd in Terminal and press tab twice it lists all directories in ...
6
votes
3answers
1k views

Open Terminal.app with directory from a given URL?

With the URL <file:///Library/Fonts> (for example in a note in NV) I can open the finder with the given location. Can I do something similar for the terminal? That is, if I write for example ...
6
votes
1answer
1k views

VIM in Terminal using Solarized Theme

I am trying to use the Solarized color scheme with VIM in Terminal on Mac OS X 10.8.5 Mountain Lion. However, the colors look washed out. They are lighter/paler than they should be. In MacVIM, the ...
6
votes
3answers
332 views

Can I adjust the time delay for when the dock re-appears?

I like to hide the dock unless I need it. There is a slight delay before it will reappear. Is there a Terminal setting I can change so that the dock will instantly appear when I move my mouse to the ...
6
votes
2answers
2k views

How do I disable (and re-enable) my Thunderbolt port from the terminal?

I've been having this problem with my Matrox DualHead2Go ME and my late 2011 15" MBP (running 10.9.2). When the displays wake from sleep, the external monitor does not re-awake. I've gathered that ...
6
votes
2answers
294 views

xcodebuild firing after every terminal command

After every terminal command, the prompt becomes unresponsive for 2-3 seconds. During this time xcodebuild seems to be running: Where would this hook be that's causing the xcodebuild to be fired? I ...
6
votes
2answers
2k views

What terminal command or program can list an SSD's Power On Hours?

I'm looking to script using the unix shell the retrieval of SSD (and HDD) data that disk utility shows in the information window. I'm immediately interested in the Power On Hours and Power Cycle, ...
6
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 ...
6
votes
1answer
818 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\ ...
6
votes
1answer
215 views

How to keep the text selection in Terminal.app when typing

In Terminal.app, when I select some text and start typing again, the text selection is gone. I personally find this very annoying. Is there a way to make Terminal.app keep the selection when I type?
6
votes
1answer
283 views

Incorrect Terminal.app output for long lines with tabs

When I run the following command in Terminal.app: echo -e "a\tb\tc\td\te\tf\tg\tyo" I should get the following output (using a 40-column window so that lines don't wrap here, and replacing tabs ...
6
votes
1answer
628 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 ...
5
votes
6answers
3k views

Why use the terminal in daily non-programming life

Disclaimer: I'm a Windows boy awaiting his first mac. I never bothered learning/using command-line interfaces. I've been looking at the Terminal Tips and Tricks topic and I don't see how any of those ...
5
votes
3answers
7k views

Use MacVim as standard Terminal?

I used to love the terminal.app for many reasons. I especially liked the way I could navigate to a file and edit using vim it all in one app, without having to leave the keyboard. But, since the ...
5
votes
5answers
2k views

OSX Bash for loop - issues with spaces in folder names?

I'm getting a bit confused on how to handle spaces in path names when returned in a for loop. Rationale: I'm cleaning up the permissions on folders and files that I copy over from Windows. Most of ...
5
votes
3answers
4k views

error: There was a problem with the editor 'vi' when using it with git

I have this strange problem with using vi as the editor for git commit -a. Normal flow is: I type git commit -a, vi appears, I enter my commit message, and then :wq to save & exit from vi. This ...
5
votes
3answers
3k views

How can I download all MP3 files from a web site?

I am wondering if there is any software available in OS X that can download all mp3s or specific type of file from a URL. For e.g. I have a url http://www.parweztv.com/Khan%20Adeeb/SURA-04/ and I want ...
5
votes
3answers
825 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 ...
5
votes
3answers
5k 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
2answers
623 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
2answers
1k views

nohup or persistent process on Mac OS X ssh

I know this has been asked before but none of the answers seems to work in OS X Mountain Lion. I would like to launch a process via SSH and close the terminal without killing the process. nohup ccl64 ...
5
votes
2answers
622 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
7k 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
387 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
9k 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
2answers
566 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
1k views

View passwords of all Wi-Fi networks my Mac has connected to in the past

I have connected my Mac to lots of public Wi-Fi networks. I want to know their passwords. What should be the terminal command to list all the Wi-Fi networks whom I connected with in the past with ...
5
votes
2answers
1k views

Time in milliseconds since epoch in the terminal

How do I get the time since the epoch, in milliseconds, in the OSX terminal? The Linux/Ubuntu equivalent is date +%s.%N: Linux $ date +%s.%N 1403377762.035521859 Which does not work in my OSX ...
5
votes
3answers
3k views

Disable Spotlight Index on 10.8 on Specific Volumes

To switch off indexing in Terminal I use: sudo mdutil -a -i off This disables it with the -a switch across all volumes and the -i off part turns "off" the indexing. If connected to my iMac is the ...
5
votes
1answer
4k 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
1answer
2k views

Terminal uses one theme for the first window and a different theme for later windows.

I want to set the "Homebrew" theme to be the default in Terminal. I've changed the setting in the preferences: I chose "on startup, open" : "new window with settings" : "Homebrew". Here is a ...
5
votes
3answers
3k views

How to make Mac Terminal restore working directories when restarting

I use the Mac Terminal with a hand full of tabs each assigned to a different working directory. I have configured it to open new windows with the same working directory. Nevertheless, when I am ...
5
votes
2answers
1k 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
403 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. ...