Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to frequently switch between directories that are in totally unrelated paths, for example /Project/Warnest/docs/ and ~/Dropbox/Projects/ds/test/.

But I don't want to type cd /[full-path]/ all the time. Are there any shortcut commands to switch to previously worked directories?

One solution I could think of is to add environment variables to .profile for the frequently used directories and cd to them using those variables.

But is there any other solution to this?

share|improve this question
in office i am using Mac OS X 10.6, which has bash shell.. in home just recently installed UBUNTU and i am not sure what shell it has.. – saiy2k Feb 8 '12 at 10:45
It has bash - run echo $SHELL. – new123456 Feb 8 '12 at 13:23
Symbolic links could also be useful for this. en.wikipedia.org/wiki/… – user606723 Feb 9 '12 at 15:11

31 Answers 31

working directory(wd) from atomic seems to be a good package for this: https://github.com/karlin/working-directory

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.