Question

I'm rubbish at Linux, so this is probably an easy question...

I want the executable here:

/root/hiphop/hiphop-php/src/hphp/hphp

To be run when I type:

hphp

How do I set that?

Was it helpful?

Solution

alias hphp=/root/hiphop/hiphop-php/src/hphp/hphp

OTHER TIPS

The environment variable called PATH will tell your shell where to look for executables. If you add a line like this:

export PATH=$PATH:/root/hiphop/hiphop-php/src/hphp

to your bashrc ( assuming you're using bash ) then that directory will be scanned for executables every time you enter something on the command line.

alternately, you could add a symlink from a location already in your PATH to that file ( which is probably a better idea ).

ln -s /root/hiphop/hiphop-php/src/hphp/hphp /usr/sbin/hphp

EDIT: also it looks like this is a program you've compiled yourself via configure/make (or similar). there is probably a make target called install which you can use to copy the file to /usr/local/sbin ( or something like that ). you will need to be root though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top