Celeb Glow
news | February 26, 2026

All commands are not working on Mac OS X Lion

I am faced with a problem, that I can't run even a single command on my Mac OS X Lion terminal, even "ls" command, when i print $PATH variable, found

My-Mac:/ Mac$ echo $PATH
/usr/local/git/bin

Please help me if you have guys have any solution for that.

1 Answer

Start with export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin to get your commands back.

If you open up a new terminal, does it start with PATH as /usr/local/git/bin? If so, it sounds like your git installation screwed up your paths in /etc/paths, or your /etc/profile

Mine has (/etc/paths):

/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin

And /etc/profile should contain the following somewhere:

if [ -x /usr/libexec/path_helper ]; then eval `/usr/libexec/path_helper -s`
fi

Do these files contain similar lines on your system? If not, we'll need to see what they do contain and then properly merge them with what should be in there. If they check out, we'll look into your /etc/bashrc or local profile configurations.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy