How do I reset the $PATH variable on Mac OS X?

Posted by Neil on Super User See other posts from Super User or by Neil
Published on 2010-03-19T19:16:57Z Indexed on 2010/03/19 19:21 UTC
Read the original article Hit count: 279

I've messed up my path variable, and now some apps that I run raise errors saying Command Not Found (error 127) for commands like 'date' and 'sleep'. These commands work fine when executed directly in the shell.

I'm guessing this has something to do with a malformed $PATH variable, and need to know how to reset it. I've deleted the files ~/.bashrc , ~/.bash_profile, /etc/bash.bashrc, and ~/.bashrc and ~/.profile.

What other files could hold my $PATH? Is there some simpler way to reset the Path than dig into the myriad files which could hold my path?

Note, this path problem is only with my user. I made a test user on my system, and the path was fine, back to normal.

© Super User or respective owner

Related posts about unix

Related posts about mac-os-x