I was trying to install some stuff for scala development on my MAC, and probably I managed broke the shell/terminal while I was mindlessly running some scripts that I don't know.

Now when I start the terminal it always starts with this line;

$ /sbin:sbin:/usr/local/bin': not a valid identifier

And now when I try, I see some bash commands does not work, for instance grep, syslog..etc I get an error saying;

-bash syslog: "no such file or directory"   

Any idea what is wrong and how can I fix this


I guess you have an illegal space in the PATH variable assignment like so:

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

# -bash: export: `/sbin:sbin:/usr/local/bin': not a valid identifier


# -bash: ls: No such file or directory

# right way is to just drop the space
export PATH=/sbin:sbin:/usr/local/bin
  • tnx if so can I fix it in my .profile file? – Spring Jun 14 '13 at 15:52
  • yes! it was in bash profile file! – Spring Jun 15 '13 at 10:30

Your Answer

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

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