PATH
is an environmental variable that contains a list of directories where the system searches for an executable that matched a command. See here for more information. The contents can be seen in your terminal with the command
echo $PATH
In theory, you thus could have your install program look at the directories in there, and install it in one of the directories listed.
However, there are conventions on the use of directories. sbins
directories are intended for system binaries, bin
directories for all other executables. You thus will select a bin
directory:
- If you distribute your executable (your script) through the packaging system of your distribution, place it in
/usr/bin
. For Ubuntu, this means your software is packaged as a .deb
installation file.
- If your script is a custom installation script, then place your executable in
/usr/local/bin
. That directory is not managed by the packaging system of the operating system.