Attach USB devices to WSL the EASY way


jimbo45

Well-known member
Pro User
VIP
Local time
12:59 PM
Posts
4,032
Location
Hafnarfjörður IS
OS
Windows XP,7,10,11 Linux Arch Linux
Hi folks

Running RockyLinux 8 based on RHEL 8 (RockyLinux successor / alternative to CENTOS 8) and similar to FEDORA.

simple way : no special software needed

1) from Powershell on Windows : List disk type devices (including usb drives) and attach the one('s) you want using the DeviceID (\\.\xxxxxxx etc).

mount1.png

OK you notice there's an error here - but that is because WSL assumes file system is ext4 if non windows - on this disk it's actually xfs - so long as xfsprogs is installed on the disro no prob. The disk is now though actually attached to the wsl. It's the 1.8 TB drive as /dev/sdf.

mount2.png
now within the wsl I simply mount it with type auto (mount /dev/xxx -t auto -o rw /mnt/DV0)

read and write access now on external usb device. !! ls shows directories on it.

file system as stated is XFS

mount3.png


Now just two things to try

1) Samba share -- see if this HDD can be found via other machines on network

2) will try and install a Desktop GUI.

Seems WSL2 is getting really useful now - could obviate the need for Linux VM's !!. Quite impressed with performance too.

I'm liking this more and more-- note I'm also running this whole kybosh from an external ssd drive too.

Cheers
jimbo
 
Last edited:

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7

Latest Support Threads

Back
Top Bottom