Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Is there a way I can set up some shortcuts to my most used directories?

I mean "cd trunk" would always get me to my trunk location (e:\projects\work.....) from any place ?

share|improve this question

I believe you are not looking for a "shortcut" but a command alias.

This post on The UNIX and Linux Forums explains how to use doskey if you have the appropriate version of Windows (which I assume you're using based on the path specified.

In Linux you can use the command alias to create e.g. cdt to expand to cd ~/projects/trunk. Cygwin and similar environments on Windows can do the same.

tip: for future posts please specify the OS you're on and if relevant the shell used. Are you using plain DOS, cygwin, etc.?

share|improve this answer

The details on your environment are very sparse, but if you use Bash or equivalent (e.g. through Cygwin), you can set CDPATH for this functionality.


~$ cd trunk
bash: cd: trunk: No such file or directory
~$ CDPATH="/projects/work"
~$ cd trunk
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.