Change drive in git bash for windows

前端 未结 6 949
你的背包
你的背包 2020-12-07 13:47

I was trying to navigate to my drive location E:/Study/Codes in git bash in windows. In command prompt in order to change drive I use E:

6条回答
  •  死守一世寂寞
    2020-12-07 14:11

    Now which drive letter did that removable device get?

    Two ways to locate e.g. a USB-disk in git Bash:

    
        $ cat /proc/partitions
        major minor  #blocks  name   win-mounts
    
            8     0 500107608 sda
            8     1   1048576 sda1
            8     2    131072 sda2
            8     3 496305152 sda3   C:\
            8     4   1048576 sda4
            8     5   1572864 sda5
            8    16         0 sdb
            8    32         0 sdc
            8    48         0 sdd
            8    64         0 sde
            8    80   3952639 sdf
            8    81   3950592 sdf1   E:\
    
        $ mount
        C:/Program Files/Git on / type ntfs (binary,noacl,auto)
        C:/Program Files/Git/usr/bin on /bin type ntfs (binary,noacl,auto)
        C:/Users/se2982/AppData/Local/Temp on /tmp type ntfs (binary,noacl,posix=0,usertemp)
        C: on /c type ntfs (binary,noacl,posix=0,user,noumount,auto)
        E: on /e type vfat (binary,noacl,posix=0,user,noumount,auto)
        G: on /g type ntfs (binary,noacl,posix=0,user,noumount,auto)
        H: on /h type ntfs (binary,noacl,posix=0,user,noumount,auto)
    
    

    ... so; likely drive letter in this example => /e (or E:\ if you must), when knowing that C, G, and H are other things (in Windows).

提交回复
热议问题