"Bash: command not found" for almost anything

Discussion in 'Mac Basics and Help' started by willabtsm, Dec 31, 2010.

  1. willabtsm macrumors newbie

    Joined:
    Dec 31, 2010
    #1
    Hello! Long time lurker, new member here.

    I'm having a problem with Terminal, specifically bash (I think).

    For almost all of the common bash/terminal commands I get
    -bash: [command]: command not found
    an example being
    -bash: ifconfig: command not found

    ls,cd,mkdir, et cetera still work.

    I was messing around with my .bashrc and other bash files a while ago trying to fix a different problem, but I may have messed something up.

    Can anyone help me fix this?
     
  2. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #2
    Sounds like you've messed up your PATH environment variable. Please enter the following in Terminal and post the result:

    Code:
    /bin/cat ~/.bashrc
     
  3. chown33 macrumors 604

    Joined:
    Aug 9, 2009
  4. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #4
  5. willabtsm thread starter macrumors newbie

    Joined:
    Dec 31, 2010
    #5

    running that gives me
    Code:
    export PATH=/usr/local/bin:/usr/bin:/bin
    export PATH=/usr/local/bin:/usr/bin:/bin
    export PATH=/usr/local/bin:/usr/bin:/bin
    export PATH=/usr/local/bin:/usr/bin:/bin
    Thanks for the thread. Running the command
    Code:
    export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
    
    temporarily fixes the problem in that particular window. The last few posts didn't help me much as the commands were geared towards someone with an android sdk problem, it seemed.
     
  6. willabtsm thread starter macrumors newbie

    Joined:
    Dec 31, 2010

Share This Page