Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

How to link php from XAMPP installation to use php command from user or any other directory in Ubuntu or Linux

Assumption:
I assume that you have already installed XAMPP in your Ubuntu OR Linux machine.
If not, then you may follow this link to do so: https://www.devopsschool.com/blog/installing-xampp-7-4-xxx-on-ubuntu/

How I got the error:
After installing XAMPP, I tries to check if I am able to access php command by running the below command:
php -v

The above command gave me following error:

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

Thanks for reading, I hope you enjoyed this article.