Most Popular

1500 questions
456
votes
1 answer

How do I launch Finder from terminal or command line

I use command line a lot, like most programmers. I want to be able to launch Finder, Safari or any other application for that matter from command line e.g. finder . where it will start Finder app, and the set the view to the current folder that…
Vijay Kumar
  • 4,561
434
votes
9 answers

Using Alt/Cmd + Right/Left Arrow in iTerm

Is it possible to move between words in iTerm using Alt + Right/Left Arrows ? Now if I press Alt+Left I will get '[D' and '[C' if I press Alt+Right.
ceth
  • 5,355
433
votes
15 answers

mds and mds_stores constantly consuming cpu

mds and mds_stores are constant CPU consumers even when I think nothing should have changed on the hard drive. Activity Monitor: I have a circa 2009 Macbook Pro with lots of software installed over the years. Dropbox and Crashplan are active…
jim70
  • 4,495
427
votes
5 answers

What is the difference between .bash_profile and .bashrc?

To make an alias for the Terminal in OS X, you can either put the aliases in .bash_profile or .bashrc. What is the difference between the two and why would I choose to put aliases in one and not the other?
daviesgeek
  • 38,901
  • 52
  • 159
  • 203
407
votes
9 answers

How do I find my IP Address from the command line?

I know you can do ifconfig | grep inet, but that shows you several IPv4 addresses. How do I get the specific one for SSHing et al?
JShoe
  • 5,139
404
votes
133 answers

Got any tips or tricks for Terminal in Mac OS X?

One tip or trick per answer. My favorite is open . Opens the folder you're currently browsing in Finder. You can also pass URLs, images, documents or else to open. If you specify a program name with -a you can pass the URL, image, document or…
Josh K
  • 1,878
  • 9
  • 25
  • 30
401
votes
13 answers

How can I trigger a Notification Center notification from an AppleScript or shell script?

I'd love to be able to take advantage of 10.8's Notification Center features in AppleScripts and shell scripts I write. Is there a built-in command or a third-party library I can use from either an AppleScript or shell script? Ideally the type and…
391
votes
13 answers

How can I configure Mac Terminal to have color ls output?

How can I configure Mac Terminal to have color ls output? I am using MacOS 10.5
lucius
371
votes
7 answers

How do I recompile Bash to avoid Shellshock (the remote exploit CVE-2014-6271 and CVE-2014-7169)?

Given that Bash 3.2 (the version shipped by OS X) is vulnerable to the remote execution exploit known as "Shell Shock" (CVE-2014-6271 and CVE-2014-7169) how do I rebuild Bash and secure my system ahead of an official Apple patch? UPDATE: Note that…
AlBlue
  • 2,745
371
votes
4 answers

How do I stop the Adobe Creative Cloud app from auto-launching on login?

How do I stop the Adobe Creative Cloud app from auto-launching on login? I don't see any option of stopping this, and for some reason it's not in OS X's user login options.
erotsppa
  • 4,829
365
votes
39 answers

What Window Management Options exist for OS X?

I'd like to do something with my windows on OS X, where something includes options like re-arranging, moving, re-sizing, remembering positions, cloning across Spaces, etc. What options exist? Rules One app per answer. Use this format for the first…
user588
355
votes
13 answers

How do I downgrade node or install a specific previous version using homebrew?

I'm using brew. I have node installed, using brew. I want to use an earlier version of node. Online, I find instructions such as, for example: cd /usr/local/Library/Formula brew remove node --force brew versions node git checkout 83988e4…
dave4420
  • 3,859
352
votes
4 answers

What are the practical differences between Bash and Zsh?

With the news that Catalina will default to Zsh instead of Bash, I'm finding lots of results telling me about the switch, and that it may cause problems with shell scripts, but I'm not familiar enough with Zsh to know what those problems might…
dr.nixon
  • 5,818
  • 3
  • 18
  • 25
350
votes
6 answers

How can I list my open network ports with netstat?

I would like to list my open network ports in Terminal with built in commands. As what I know, netstat is the command to use. But I'm struggling to get any useful information out of it. How can I list my open ports with netstat? Any specific flags…
Jonas
  • 6,262
348
votes
6 answers

How can I disable animation when switching desktops in Lion?

I would very much like to disable the sliding animation that occurs when switching desktops via ctrl+→/← or ctrl+[number] in Lion. This was previously accomplished in previous versions with this command: defaults write com.apple.dock…
Rob J
  • 3,481