Question

Can anybody explain what is wrong with my terminal:

 
$ echo $PATH
=/usr/local/bin
$ ls
-bash: ls: command not found
$ cd
-bash: find: command not found

Why won't these commands work? Help? Anyone?

Was it helpful?

Solution

I'm guessing your .bash_profile or .bashrc has a line that looks like

export PATH=/usr/local/bin

This is overwriting all the existing stuff that needs to be in your $PATH. You need to change this line to look like

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

OTHER TIPS

"ls" lives in "/bin" and "find" lives in "/usr/bin". You need to add these to your $PATH in your bash_profile or .bashrc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top