2

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?

# I'm using Ubuntu 14.04

Zen
  • 683
  • 1
  • 7
  • 17

1 Answers1

2

Add

alias gb='cd /media/Dan/evolution'

to your ~/.bashrc file and everytime when you type gb your shell changes to the directory /media/Dan/evolution.

Running below command would add a line to .bashrc file

echo  "alias gb='cd /media/Dan/evolution'" >> ~/.bashrc

And then restart the terminal

dedunu
  • 9,186
chaos
  • 27,506
  • 12
  • 74
  • 77