How to create an alias ?

Alias can be useful in the cases when we don't want to search some files located somewhere in a directory. Imagine the case when we have a simple bash script called printer.sh printing "Hello world":

#!/bin/bash
echo "Hello world"

Initialy it's placed in ~/tmp directory so we can call it only with ~/tmp/printer.sh command. But thanks to aliasing it, we can call it easier, for example with print_hello command:

echo alias print_hello='~/tmp/printer.sh' >> ~/.bashrc
bash # avoids to rerun command line

print_hello should now execute printer.sh script:

bartosz@home~$ print_hello
Hello world