Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Access Linux Files from Windows: Easy Guide

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Need to read or copy files from a Linux drive or partition while using Windows? This guide shows you several reliable methods to access Linux files from Windows, whether you're dual-booting, using a live USB, or pulling files from a remote Linux machine. No special software is required for the simplest approach, and the more advanced methods give you full read/write access.

What You'll Need

  • A Windows PC (Windows 10 or 11 recommended)
  • Access to the Linux files (either on a local drive/partition or a remote system)
  • For some methods: administrator rights on Windows
  • For remote access: the Linux machine's IP address and login credentials

Step-by-Step

Method 1: Use WSL (Windows Subsystem for Linux) to Mount Linux Drives

  1. Install WSL if you haven't already. Open PowerShell as Administrator and run: wsl --install. Restart your PC when prompted.
  2. After installation, open the Start menu and launch your Linux distribution (e.g., Ubuntu). Let it finish the initial setup.
  3. To access a Linux drive (like an ext4 partition), open a terminal in WSL and run: wsl --mount \\.\PHYSICALDRIVE0 --partition 3. Replace PHYSICALDRIVE0 with the correct disk number and 3 with the partition number. You can find these by running wmic diskdrive list brief in PowerShell or lsblk in WSL.
  4. Once mounted, the drive will appear under /mnt/wsl/ in WSL. You can browse it with cd /mnt/wsl/ and copy files to Windows using cp or by accessing it via the \\wsl$\ path in File Explorer.
  5. To unmount the drive when done, run wsl --unmount \\.\PHYSICALDRIVE0.

Method 2: Use a Linux Live USB to Copy Files

  1. Create a bootable USB drive with a Linux distribution like Ubuntu. You can use Rufus or the Windows Media Creation Tool for this.
  2. Insert the USB drive and restart your PC. Boot from the USB (you may need to press a key like F12 or Esc to select the boot device).
  3. Choose "Try Ubuntu" (or your distribution's live mode) instead of installing.
  4. Open the file manager. Your Windows drives will appear under "Devices" or "Other Locations" (e.g., "Windows Files").
  5. Navigate to the Linux files you need, then drag and drop them to a Windows drive (like a USB drive or the Windows partition).
  6. Shut down the live session and remove the USB drive.

Method 3: Use a Third-Party Tool (e.g., DiskInternals Linux Reader)

  1. Download and install a tool like DiskInternals Linux Reader (free for read-only access).
  2. Launch the application. It will list all drives connected to your PC, including Linux partitions (ext2/3/4, XFS, etc.).
  3. Select the Linux partition you want to access.
  4. Browse the files in the main window. Right-click a file or folder and choose "Save to" to copy it to a Windows location.
  5. For write access, you'll need the paid version of the tool, but reading and copying is free.

Method 4: Access Linux Files Over the Network (SSH or Samba)

  1. Ensure the Linux machine is on the same network as your Windows PC.
  2. On the Linux machine, enable SSH: sudo apt install openssh-server (for Debian/Ubuntu) and start it with sudo systemctl start ssh.
  3. On Windows, open File Explorer and type \\linux-ip\ in the address bar (replace with the actual IP). If that doesn't work, use an SSH client like PuTTY or the built-in OpenSSH client in Windows: ssh username@linux-ip.
  4. For a graphical interface, install Samba on Linux: sudo apt install samba, then configure a share in /etc/samba/smb.conf. Access it from Windows via \\linux-ip\sharename.

Common Mistakes

  • Not disabling Fast Startup in Windows: Fast Startup can leave Windows drives in a locked state, making them read-only when accessed from Linux. Disable it in Control Panel > Power Options > Choose what the power buttons do.
  • Using the wrong partition number: When using wsl --mount, using the wrong partition number can cause errors or mount the wrong drive. Always verify with lsblk or Disk Management.
  • Assuming all Linux files are on a separate partition: If you're using WSL, your Linux files are stored in a virtual hard disk (ext4.vhdx) and are not directly accessible as a partition. Use the WSL file system instead.
  • Forgetting to unmount: Leaving a drive mounted in WSL can cause issues when shutting down or booting into Linux. Always unmount when done.

Tips

  • For one-time file transfers, the live USB method is the most reliable and doesn't require installing anything.
  • If you need regular access, setting up Samba on Linux is the most seamless for Windows users, as it makes the Linux files appear as a network drive.
  • When using WSL, you can also access your Windows files from Linux (under /mnt/c/), which is handy for copying files in both directions.
  • Always back up important files before attempting to mount or modify partitions.

Troubleshooting

  • WSL mount fails with "invalid argument": Make sure the partition is not already mounted. Run wsl --mount \\.\PHYSICALDRIVE0 --partition X with the correct disk and partition numbers. If it still fails, try running WSL as Administrator.
  • Can't see the Linux drive in Windows: Windows doesn't natively read ext4. Use a third-party tool or WSL to access it. If using a tool like DiskInternals, ensure you're running it as Administrator.
  • Live USB doesn't boot: Check your BIOS/UEFI boot order and disable Secure Boot if necessary. Also ensure the USB is properly formatted (use Rufus with GPT for UEFI).
  • Network access is slow or fails: Check firewall settings on both machines. On Linux, allow SSH/Samba through the firewall: sudo ufw allow ssh and sudo ufw allow samba.
  • Files are read-only: If you're accessing a Windows NTFS partition from Linux, it's often mounted read-only due to Fast Startup. Disable Fast Startup in Windows and restart.

Frequently Asked Questions

Can Windows natively read ext4 drives?

No, Windows doesn't have built-in support for ext4. You need third-party software or WSL to read ext4 drives.

Is it safe to write to Linux files from Windows?

It can be, but it's risky if you're modifying system files. For personal files, it's generally safe, but always back up important data first.

How do I access my WSL files from Windows File Explorer?

Open File Explorer and type \\wsl$\ in the address bar. You'll see your installed Linux distributions, and you can browse their file systems.

Can I access Linux files from Windows without installing anything?

Yes, using a live USB is a no-install method. You boot into Linux from the USB and copy files to a Windows-readable location.

What is the best method for regular access?

Setting up Samba on Linux is the most convenient for ongoing access, as it creates a network share that Windows can map to a drive letter.

Will accessing Linux files from Windows damage them?

If you only read and copy, it's safe. Writing to Linux partitions from Windows can cause issues if the Linux system is hibernated or the partition is in use. Always ensure the Linux system is fully shut down.