When I open terminal I get an automatic error message -bash: PATH command not found.
then I am stumped in getting multiple -bash "x" command not found.
messages, even to simple commands such as ls
cd
mkdir
rm
.
Just about the ONLY commands I get a response to are echo
and export
. Could my Unix system files be corrupt, as has been suggested in some searches for help? My hunch is that there is some setting that directs me away from the proper spot to make UNIX commands, but I don't know how to fix that.
Your .bashrc or .bash_profile files (or other startup files) contain a typo, and your PATH is invalid. To really be certain, we'd need to see your .bashrc or .bash_profile files.
Commands like ls
mkdir
rm
won't work because your shell cannot find them in your PATH, because your PATH is invalid. Commands like echo
and "export
are built in to Bash, which is why they work. I can't explain the problem with cd
(perhaps a mistake?)
Search your .bashrc or .bash_profile files and look for the lines where PATH is defined. You might have a bad definition where second PATH doesn't start with a $, like this:
export PATH=PATH:/usr/local/bin:/usr/local/sbin
export PATH=PATH:/opt/local/bin:/opt/local/sbin
It should say something like this:
export PATH=$PATH:/usr/local/bin:/usr/local/sbin
export PATH=$PATH:/opt/local/bin:/opt/local/sbin
-
Um,
cd
is built into the shell. It should work even with an invalidPATH
. – Michael Ratanapintha Feb 8 '11 at 3:13
~/.bashrc
file? – Steven D Feb 8 '11 at 0:07