Which file to add to /usr/local/bin from a program installed from source? [closed]
I know that when I install a program from source is possible to make it run in terminal only by typing its name using these two ways
- copy executable file from home directory to
/usr/local/bin. - add its path to the
PATHin~/.bashrcfile.
Which file (or better to say which type of file) from home directory I should add to /usr/local/bin? Please do not tell me just executable! I saw a lot of executable files in my home/myprogram directory with this command:
find . -perm -u+x -type ffrom How to find executables. Also there is a file named myprogram. Should I add this to /usr/local/bin?
1 Answer
Whatever you try to do or to archive, please try as much as possible to not add your executable files in a system directory like /usr/local/bin. This can be unpleasant for other users who use the same system.
You can put your executable files in your ~/bin directory. If you don't have already one, create it:
mkdir -p ~/binThis directory is already added to your PATH as you can see in the last lines from your ~/.profile file. So, any executable that you put there can be run only by typing it's name.
And which file to add? - Any file you want, nobody (other than you) and nothing will be disturbed because of this.
In case of a program installed from sources you better create a symbolic link to the executable file which starts the program, instead to copy the executable file:
ln -s /path/to/program/executable_file ~/bin 1