I have installed xampp on my machine .. all running good but when i type php
in terminal that suggest me to install from apt-get
So want to get rid off this and i am new to Ubuntu .. help will be appreciated thanks
I have installed xampp on my machine .. all running good but when i type php
in terminal that suggest me to install from apt-get
So want to get rid off this and i am new to Ubuntu .. help will be appreciated thanks
This is simple just create a symlink. I just did this with a fresh install of Ubuntu 18.0.4 Bionic Beaver and XAMPP x64-7.4.4-0-installer. Just execute the following command in the terminal
sudo ln -s /opt/lampp/bin/php /usr/bin/php
Where you installed XAMPP? You remember the path? You need looking for PHP binary somewhere there.
If you don't remeber the path, maybe this will be help: sudo find / -name 'php'
. When you will be have path, you need add this into PATH
variable - How to add a directory to the PATH?
/opt/lampp/bin/php
, so you need add directory/opt/lampp/bin/
to yourPATH
variable – Marek Skiba Sep 14 '16 at 08:06echo $PATH
– Marek Skiba Sep 14 '16 at 08:13PATH="$HOME/bin:$HOME/.local/bin:$PATH" PATH="$PATH:/opt/lampp/bin/php"
– Rizwan Arshad Sep 14 '16 at 08:29PATH
variable, not path to PHP binary! So add/opt/lampp/bin/
instant of/opt/lampp/bin/php
– Marek Skiba Sep 14 '16 at 08:46