For example, can I set
gb = cd /media/Dan/evolution
So that everytime I execute
gb in bash, I can
cd to that particular directory?
I find something online,
alias command. But It seems can't do the work above.
Is it possible to do it? How?
To make this setting permanent (so that it sticks after you restart or open another console) add this line to the file ~/.bashrc (assuming you use the bash as your default shell)
Alternative to aliasing
This defines shell function gb, which takes no arguments, and performs cd /media/Dan/evolution. As with other suggeststions, this can be added to ~/.bashrc
It is possible, and
Alternatively, it is possible to write a C program that calls the desired command and save it to /usr/bin.
To compile it, go to the directory where the source was saved (in bash) and execute (you may need sudo):
After further research here, I realized simply throwing your command in