Alias to the PHP command

Ok sorry for silly question

I have Ubuntu setup running web server and would like to how to create a shortcut or alias to enable php command from anywhere with entering the full adress like /opt/lampp/bin/php

Who is Participating?
TeRReFConnect With a Mentor Commented:
Check your environment by using the set command.
set | grep PATH

THen use one of the dirs in your path (for instance /usr/bin)
cd /usr/bin
ln -s /opt/lampp/bin/php php

That should give you access to php from everywhere...
mrwildeAuthor Commented:
excellent that work great
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.