User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
windows_subsystem_for_linux_setup [2020/08/08 13:52]
tkbletsc [Run explorer from this directory in bash]
windows_subsystem_for_linux_setup [2021/04/27 10:00]
Line 55: Line 55:
 #IfWinActive #IfWinActive
 +===== Script to mount *all* drives =====
 +By default, WSL just mounts physical drives around at boot. This script mounts all drives Windows knows about to directories under /mnt:
 +for DRV in `wmic.exe logicaldisk get name | grep : | awk '{print tolower($1)}'` ; do
 +    MNT=/mnt/${DRV::1}
 +    if mount | grep -q $MNT ; then
 +        echo $MNT already mounted
 +    else
 +        sudo mkdir -p $MNT
 +        sudo mount -t drvfs $DRV $MNT
 +    fi
 </code> </code>
windows_subsystem_for_linux_setup.txt ยท Last modified: 2021/04/27 10:00 by tkbletsc