Search code examples
macosterminallscd

terminal cant do ls or cd


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?


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