Super User is a question and answer site for computer enthusiasts and power users. 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 want to map a directory c:\Animal\Cat to /Cat So that when i use Cygwin, and just type cd /Cat from any directory, it goes to /c/Animal/Cat
How would i do that?

I have already done mount -c /, so i have the following when i do the df command:

Filesystem     1K-blocks Used      Available  Use% Mounted on  
C:/cygwin/bin  488384532 187949036 300435496  39% /usr/bin  
C:/cygwin/lib  488384532 187949036 300435496  39% /usr/lib  
C:/cygwin      488384532 187949036 300435496  39% /  
C:             488384532 187949036 300435496  39% /c  
share|improve this question
up vote 1 down vote accepted

Depending on how you'd prefer to tackle this, here are two suggestions:

  • You can create a symbolic link for this directory:

    ln -s /source/directory/ /Cat

    You can test this by then running ls /Cat

  • You can create an alias to simply move to the directory using a friendly name:

    cat >>.bashrc
    # Alias for changing to a desired directory
    alias Dog='cd /source/directory'

Then issues the command source ~/.bashrc or log out and back in. Then, issuing the new Dog alias will cd to your desired directory.

It may be best to steer clear of aliasing system commands when using friendly names in your .bashrc that are close to them (Replace cat with Dog for instance).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .