Created
August 5, 2021 18:34
-
-
Save tigerhawkvok/82b63753037eb8be5e6ce04dd8b5ed41 to your computer and use it in GitHub Desktop.
Mount a removable drive in WSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Works in .bashrc too | |
# Mount the D: drive | |
test -r /mnt/d || eval "$(sudo mkdir /mnt/d)" | |
test -r /mnt/d/'System Volume Information' || eval "$(sudo mount -t drvfs D: /mnt/d)" | |
test -r /mnt/d/'System Volume Information' && echo 'D: successfully mounted' || echo 'Failed to mount removable drive' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment