Link Linux file path to a command

1

I would like to link the path to the file /opt/lampp/lampp to the word lampp in openSUSE. So I can simply type lampp start instead of /opt/lampp/lampp start Is this possible? If so, how?

Jef Null

Posted 2011-12-28T20:10:27.587

Reputation: 23

Answers

3

Three possibilities: either, make an alias:

alias lampp=/opt/lampp/lampp

or, add /opt/lampp to your PATH:

PATH=$PATH:/opt/lampp

or, make a link to your bin (and add this bin to your PATH):

ln -s /opt/lampp/lampp $HOME/bin/
PATH=$HOME/bin:$PATH

choroba

Posted 2011-12-28T20:10:27.587

Reputation: 14 741