Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
Last login: Thu Sep 16 15:13:07 from bubs
-bash: export: `/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin': not a valid identifier
rick:~ rick$

When I open a new terminal window in OS X it always gives me this error. I am completely ignorant on all things Mac (or *nix) and can't find where a config or something would be that is calling this export command when I open a window

share|improve this question

migrated from Sep 17 '10 at 1:37

This question came from our site for professional and enthusiast programmers.

Looks like you have an error in your .bashrc, .profile, .bash_profile, .bash_login /etc/profile, or other such init file.

The error is likely to be around a line that says something like:

export "/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin"


export $PATH

In order to correctly set the path, you need to use something like:

export PATH="/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin"
share|improve this answer
thanks, it was in .bash_profile – rschmitty Sep 16 '10 at 22:46


grep export .??*

You will see output that looks vaguely like:

.profile:export RUBY_HEAP_MIN_SLOTS=500000
.profile:export RUBY_HEAP_SLOTS_INCREMENT=250000
.profile:export RUBY_GC_MALLOC_LIMIT=50000000

The name to the left of the colon will be the file name that contains an export line. One will not look like the others or will not look like:

export PATH=a:bunch:of:stuff

Edit that line. You should also try grep PATH .??* as the intersection of the two output lists should be the bad line.

share|improve this answer

Your Answer


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