Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

willabtsm

macrumors newbie
Original poster
Dec 31, 2010
3
0
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?
 
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?

Sounds like you've messed up your PATH environment variable. Please enter the following in Terminal and post the result:

Code:
/bin/cat ~/.bashrc
 
Sounds like you've messed up your PATH environment variable. Please enter the following in Terminal and post the result:

Code:
/bin/cat ~/.bashrc


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

Similar thread in Mac Programming:
https://forums.macrumors.com/threads/1067170/

See the final few posts in particular.

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.