How to link to php from xampp installation so i can just use php command instead of full path?

Solution 1:

Have you tried symlinking the php binary from /usr/bin?

Assume your XAMPP installation is in default location /opt/lampp

This is the command to achieve that (in your case):

sudo ln -s /opt/lampp/bin/php /usr/bin/php