Accessing RDP Shares in Linux WSL: Connecting Linux and Windows 11 Machines

Abstract: Resolves the inability to access Windows shares in WSL by replacing deprecated RDP mounting with stable SMB/CIFS configuration.

Created: 2026-10-07 by

Accessing Windows shares from WSL requires configuring the network bridge and using standard SMB clients like smbclient or cifs-utils, not RDP mounting tools. This guide details how to establish a stable connection between your Linux distro and Windows 11, ensuring seamless file interoperability without relying on unsupported or deprecated features.

Understanding the Network Bridge

WSL 2 runs in a lightweight utility virtual machine that is isolated from the host network by default. However, it uses NAT (Network Address Translation) to allow outbound connections. To access resources on your Windows host, you must first identify the IP address assigned to the WSL instance. Open your Windows Command Prompt or PowerShell and run hostname -I inside the WSL terminal. This command returns the IP address of the Linux environment, which is typically dynamic but remains consistent within a single boot session.

On the Windows side, ensure that File and Printer Sharing is enabled. Navigate to Settings > Network & Internet > Advanced network settings > Advanced sharing settings. Under the "Private networks" section, verify that Network discovery and File and printer sharing are turned on. If you are using a public network profile, change it to private for the active adapter, as public profiles block these connections for security reasons. You also need to know the IP address of your Windows host. In PowerShell, running ipconfig will show the IPv4 address of your Wi-Fi or Ethernet adapter. Note this down, as you will need it to connect from Linux.

Installing Necessary Tools

While some older tutorials suggest using Remote Desktop Protocol (RDP) clients like xfreerdp to mount drives, this approach is technically flawed. The /mount parameter for xfreerdp was removed years ago because it relied on legacy protocols that are insecure and incompatible with modern Windows security models. Attempting to use it results in errors or failed connections. Instead, you should use native SMB/CIFS tools designed for Linux.

If you are using Ubuntu or Debian-based distributions, install the necessary packages by running:

sudo apt update
sudo apt install cifs-utils smbclient
For Fedora or Red Hat-based systems, use:
sudo dnf install cifs-utils samba-client
These tools provide robust support for interacting with Windows shared folders over the network. Troubleshooting SSH WSL Machine: Can't Connect to Localhost often involves similar network configuration issues, so if you encounter connectivity drops, check your firewall rules similarly.

Minting Shares Manually

The most reliable method is to manually mount the share each time you start your WSL session. Create a directory in your Linux home folder to serve as the mount point:

mkdir ~/windows-share
Then, use the mount.cifs command to connect. Replace WIN_IP with your Windows host's IP address and ShareName with the name of the shared folder on Windows:
sudo mount -t cifs //WIN_IP/ShareName ~/windows-share -o username=YourWindowsUser,password=YourPassword,noserverino
You can omit the password prompt by creating a credentials file, but for testing, entering it directly works. The noserverino option is crucial; it prevents inode number conflicts between Linux and Windows filesystems, which can cause applications to behave unpredictably.

To make this persistent across reboots, you can add an entry to /etc/fstab. However, because the WSL IP changes every boot, hardcoding the mount in fstab is tricky. A better approach is to create a script in /usr/local/bin that retrieves the current Windows IP via nbtstat -A or DNS resolution and mounts the share automatically. Alternatively, you can use the wsl.exe command from Windows to trigger a mount script at startup, though this adds complexity.

Using SMB Client for Ad-Hoc Access

If you do not need permanent access, the smbclient tool is excellent for quick file transfers. It operates similarly to an FTP client. Run:

smbclient //WIN_IP/ShareName -U YourWindowsUser
Once connected, you can use commands like ls, get, and put to manage files. This method does not require root privileges and is safer for occasional use. It also avoids the overhead of maintaining a mounted filesystem, which can sometimes lead to stale file handles if the network drops briefly.

Troubleshooting Common Issues

If you receive "Connection refused" errors, ensure that your Windows Firewall allows inbound traffic on ports 445 (SMB). Check this in Windows Defender Firewall with Advanced Security under "Inbound Rules". Look for "File and Printer Sharing (SMB-In)" and ensure it is enabled for your current network profile. Another common issue is authentication failures. Windows 11 may disable guest accounts or require NTLMv2 authentication. If you get access denied, try adding sec=ntlmssp to your mount options. Additionally, ensure that the user account you are logging into has permission to access the shared folder on the Windows side. Right-click the folder in Windows, go to Properties > Sharing, and verify the user list includes your account with Read/Write permissions.

Frequently Asked Questions

Why did my previous RDP mount attempt fail?

The /mount feature in xfreerdp is deprecated and removed from modern versions due to security vulnerabilities and protocol incompatibilities. RDP is designed for remote display control, not file system mounting, making it an unsuitable tool for this task.

Can I access Windows shares without installing any software?

No, WSL is a Linux environment and cannot natively interpret Windows file paths or SMB protocols without specific drivers or network clients. You must install cifs-utils or smbclient to bridge the two operating systems effectively.

How do I handle changing IP addresses in WSL?

Since WSL 2 IPs change on every restart, automating the mount process is challenging. Using DNS names like //localhost/ShareName often fails in WSL 2 due to NAT limitations. The best practice is to write a startup script that queries the Windows host IP dynamically before mounting.

Is it safe to store passwords in plain text in fstab?

It is not recommended. Instead, create a credential file with restricted permissions (chmod 600) and reference it in your /etc/fstab entry using the credentials=/path/to/file option. This ensures only the root user can read the sensitive data.

What if I am on a domain-joined Windows machine?

Domain environments often enforce stricter Kerberos authentication. In such cases, simple username/password mounts may fail. You may need to configure SSSD or use kinit to obtain a Kerberos ticket before attempting to mount the share, which requires additional configuration beyond basic SMB setup.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More