How to navigate to a directory in C:\ with Cygwin?

前端 未结 13 1750
渐次进展
渐次进展 2020-12-04 04:41

I\'m trying to install PyQt4 so I can mess around with it. The installation guide said I had to install Sip. The last step to installing Sip is to use the make install

相关标签:
13条回答
  • 2020-12-04 04:59

    Define a variable in .bashrc :

    export C=/cygdrive/c
    

    then you can use

    cd $C/
    

    and the tab autocompletes correctly (please include the / at the end)

    0 讨论(0)
  • 2020-12-04 05:00

    The one I like is: cd C:

    To have linux like feel then do:

    ln -s /cygdrive/c/folder ~/folder
    

    and use this like: ~/folder/..

    0 讨论(0)
  • 2020-12-04 05:02

    You already accepted an answer, but I just thought I'd mention that the following also works in Cygwin:

    cd "C:\Foo"
    

    I think the cd /cygdrive/c method is better, but sometimes it's useful to know that you can do this too.

    0 讨论(0)
  • 2020-12-04 05:02

    You can just use

    cd C:/Users/../..
    
    0 讨论(0)
  • 2020-12-04 05:05

    you can try this

    /cygdrive/c/directoryname
    
    0 讨论(0)
  • 2020-12-04 05:09

    On a related note, you may also like:

    shopt -s autocd
    

    This allows you to cd a dir by just typing in the dir

    [user@host ~]$ /cygdrive/d
    cd /cygdrive/d
    [user@host /cygdrive/d]$ 
    

    To make is persistent you should add it to your ~/.bashrc

    0 讨论(0)
提交回复
热议问题