Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For some reason, many command I try to execute I get command not found I've tried touch, mkdir, sudo, ln -s all the same result

ilyas-mac-pro:~ ilya$ mkdir bla
-bash: mkdir: command not found
share|improve this question
up vote 5 down vote accepted

You changed your $PATH (more about it). Try to enter the full path of commands, e.g. /bin/mkdir (or /usr/bin/mkdir, not sure right now).

echo $PATH to see the current path variable value.

export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin for a sane value.

Check your shell init files, e.g. .profile or .bash_profile for lines like the export PATH=... above and remove them.

share|improve this answer
To add to Daniel's answer, the proper default for $PATH in OSX is /usr/bin – Yitzchak Aug 3 '11 at 16:06
@Yitzchak: The default PATH on OS X 10.6 is /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin. It should always include at least /usr/bin:/bin:/usr/sbin:/sbin since the "standard" system binaries are spread between those 4 directories. – Gordon Davisson Aug 4 '11 at 4:51
I stand corrected. I haven't used OSX since leopard. – Yitzchak Aug 4 '11 at 15:59

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.