I'm trying to run an executable via the cli, like so:
but i get "command not found" so i have to do:
which works, how do i set it so i only have to use the executable name?
You'll have to append /usr/lib/php/bin to your $PATH environment variable. The best way to do this is to edit .bashrc or .profile and add /usr/lib/php/bin at the end of the $PATH like in the example below.
You can also symlink to a place in the standard path. If you need to execute it outside of shell or if it had to be available for all users