When I run terminal using the icon on my desktop, I get this error:

-bash: export: `:/System/Library/Frameworks/Python.framework/Versions/2.6/bin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin': not a valid identifier

And subsequently, no commands are working (ls, ssh, sudo, rm, cp and so forth). What is happening???

  • "When I run terminal"? What does this mean? What exact line are you typing at the terminal prompt. Please Update your question with the exact command and exact response. Please read the markup documentation so that you can format your inputs and outputs exactly, please. – S.Lott Jul 14 '11 at 22:12
  • sounds like a bad /etc/profile (or the osx equivalent) – serotonin Jul 14 '11 at 22:13

Somewhere in your ~/.bashrc or ~/.bash_profile, there is a variable preceded by $ to the left of a = sign. Probably something like this:

export $PATH=...

You should fix it with:

export PATH=
  • or more likely in ~/.profile on OS X. – Simon Jul 14 '11 at 22:17

You've probably set PATH to a bad value. Try to reset it to something sensible:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy