Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 default when executing ctags via the Terminal.

How can that be achieved?

share|improve this question
up vote 1 down vote accepted

The safest way is to make sure /usr/local/bin comes before /usr/bin in your $PATH variable.

share|improve this answer
what is the safest way to change the $PATH variable? – Anonymous Feb 14 '13 at 19:54
It should be set in your shell config file (.profile, .bashrc for bash, .zshrc or .zshenv for zsh, etc...) You probably just need to rearrange the order of the folders. Assuming bash: look for a line that starts "export PATH=…" The delimiter between the folder names is a colon. – Mark Feb 14 '13 at 19:56
You don't want ctags as part of that path, just /usr/local/bin – Mark Feb 14 '13 at 20:08
You need to open a new shell window to execute the changes to ~/.bash_profile. – Mark Feb 14 '13 at 20:12
That should work. – Mark Feb 14 '13 at 20:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.