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 printing "Hello world":

echo "Hello world"

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

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

print_hello should now execute script:

bartosz@home~$ print_hello
Hello world