Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just found after installing new Mountain lion, I can no longer use the command line because all the command seems to be " NOT Found", even for basic "sudo" command

sudo: command not found

How can i resolve my problem. I live together with command line.

share|improve this question
    
Could it be the PATH is not being set? echo $PATH –  suspectus Mar 25 '13 at 22:55
add comment

migrated from stackoverflow.com Mar 26 '13 at 0:25

This question came from our site for professional and enthusiast programmers.

1 Answer

I don't have enough rep to comment, sorry.

You should check your $PATH like suspectus says. You may need to $ /bin/echo $PATH or /usr/bin/env

Also try $ /bin/bash --noprofile, this will load you up without your startup files. If things are working then it's the startup files at fault.
Try $ /bin/bash --verbose to see what's being run when you start a bash shell, and then find the file this is in to fix it!
e.g ~/.bashrc, ~/.bash_profile, ~/.profile, /etc/profile, /etc/bash.bashrc

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.