Server Fault is a question and answer site for system and network administrators. 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

I built a C program using make on Ubuntu. The resulting bin file is executeable via ./binfilename but not by just executing it in the directory it was build. How can i "convert" it to a bin file that I can copy to /usr/bin so I can execute it "system-wide" or does this require a different build process?

share|improve this question

This is not because there is a difference between the binaries but because the directory the binary is in is not in your PATH.

On Windows the current directory is always part of your PATH. However this is not secure (imagine someone placing a copy of rm named ls in some directory).

So you need to either place the binary in one of the directories in your PATH (see echo $PATH) or you have to add that particular directory to yuor PATH. e.g. by adding something like


to your ~/.bash_rc.

share|improve this answer
Damm, o.k., that was easy :) – bitrocker Apr 26 '12 at 10:13

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.