Let's suppose I have compiled something and I run it like so:
$ /path/to/my/executable/mycmd Hello World
What do I need to do to run it like
$ mycmd Hello World
from everywhere in my computer?
What you are looking for is the
Now... The best practice if you want use some new program is to install it using the package management program for your distribution. But in this case, I assume you are dealing with a program that is not delivered by any available software package. For such programs, you have two options: