Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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???

share|improve this question

migrated from stackoverflow.com Nov 20 '11 at 1:14

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

    
"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
add comment

2 Answers 2

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=
share|improve this answer
    
or more likely in ~/.profile on OS X. –  Simon Jul 14 '11 at 22:17
add comment

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

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

share|improve this answer
add comment

Your Answer

 
discard

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