However, USB drives that are manually mounted do not follow the settings.Īt the very least, you'll probably want your WSL user to be the owner, which is done with the -o uid=$(id -u $USER),gid=$(id -g $USER) (usually, this is the same as -o uid=1000,gid=1000 in a default Ubuntu/WSL installation).Īdding in the metadata option can be useful if you want to preserve permissions via rsync or cp -a. with fdisk -l (that is an lowercase L, not a number 1) or with another tool such as gpart. First, check how the disk is partitioned (e.g. If the drive is not yet in fstab, then it will do nothing with regard to that drive. The metadata disabled for performance, which means only a "simplified permission" model will be used to map Windows/NTFS and Linux permissions. 3 Answers Sorted by: 22 mount -a mounts all filesystems in /etc/fstab.With the default WSL user and its primary group as the owner of the mount.Most fixed Windows drives will be mounted: In general, the other method will work, but note that drives that are manually mounted this way do not follow the normal WSL automount settings. Sudo mount -t drvfs h: /mnt/h -o uid=$(id -u $USER),gid=$(id -g $USER),metadata Sudo mount -t drvfs : /mnt/ -o uid=$(id -u $USER),gid=$(id -g $USER),metadataįor a USB drive which is assigned in Windows to H:, for example: sudo mkdir /mnt/h Consider a slight alternative on the currently top voted answer: sudo mkdir /mnt/
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |