How to Mount USB Drives in WSL
If you use the Windows Subsystem for Linux (WSL) environment, you might want to use your USB drives inside your Linux environment. Windows 11 handles your internal drives automatically, but external drives need a little extra help.
Why mount-ubuntu-linux-file-system-on-windows-wsl/" class="sal-link" rel="noopener" target="_blank" data-sal-id="16253">mount a USB in WSL?
Mounting your drive lets you move files between your Windows folders and your Linux apps. It makes working on projects much faster.
What happens when done?
Once you finish these steps, your USB drive will show up as a folder inside your Linux environment. You can then read or write files to that drive just like any other folder.
Simply insert a removable drive, and Windows will recognize and mount it into your computer.
How to mount an external drive
Before you begin, make sure your drive is plugged in and you know its drive letter (for example, F:). You can find this in your drive letter.
Note: You will need to run these commands with administrative privileges.
- Open your Linux terminal.
- Create a folder where your drive files will live by typing:
sudo mkdir /mnt/f - Mount the drive to that folder with this command:
sudo mount -t drvfs F: /mnt/f
You can now find your files inside the /mnt/f folder in Linux.
How to unmount your drive
When you are finished, it is important to unmount the drive so your data stays safe. Run this command:
sudo umount /mnt/f/Summary
- Internal drives mount automatically in WSL.
- External drives like USBs must be mounted manually using the
mountcommand. - Always use the
umountcommand before unplugging your device to prevent data loss.
Was this guide helpful?
Leave a Reply