When I work I often do:
cd ~/dev/lab/prod/
It is just an example but I would like to be able just to run:
prod
With the same effect (changing into the ~/dev/lab/prod folder).
Alias is what you are looking for.
For bash you have to do following steps:
1) Open your .bashrc
nano ~/.bashrc
2) Add new alias (at the end of file)
alias prod='cd ~/dev/lab/prod/'
3) Save and close the file
4) Source the .bashrc file
source ~/.bashrc
5) Use created alias prod for cd ~/dev/lab/prod/ command
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With