How do I create a psuedo command for the terminal?
The basic command for lampp is:
sudo /opt/lampp/lampp start
But I don't want to type this every time so can I create a psuedo for this so I can just type
lampp start
lampp startssl
lampp stop
and so forth so that lampp invokes sudo /opt/lampp/lampp
.
Edit your
~/.bashrc
file and create aliases.It's quite simple, just add lines such as:
Be careful when creating your aliases because you may create an alias which is name the same as something that already exists. Also, do not delete anything else in that file or your may find things breaking.
Please type the below commmands after starting a terminal with Ctrl+Alt+T:
go to the end of the file and add the following alias to the standard
lampp
command:press Ctrl+S to save and Alt+F4 to close gedit.
This will bring you back to the terminal which you exit and re-open again. if you're on a
TTY
you need to type:Now you can use the
lammp
command normally, but as aliases get executed before normal commands, it'll look like you typesudo /opt/lampp/lampp
every time you just typelampp