Mount NFS share from WSL in Windows 10

Abstract: Resolve command not found errors and enable network storage access by installing nfs-common in WSL to mount remote NFS shares.

Created: 2026-09-27 by
You can mount an NFS share from Windows Subsystem for Linux (WSL) in Windows 10 by installing the nfs-common package within your Linux distribution and using the standard mount command to attach the remote filesystem. This process allows WSL 2 instances to access network storage directly, enabling seamless file operations between your Linux environment and external NFS servers without requiring complex third-party tools or virtual machine configurations.

Prerequisites and Network Configuration

Before attempting to mount the share, ensure that your Windows host and the NFS server are on the same network segment and that firewall settings permit traffic on port 2049. WSL 2 runs in a lightweight utility VM with its own virtual network interface, which means it does not automatically inherit all host networking configurations. You must verify that the NFS server is reachable from the WSL environment by pinging the server’s IP address from inside your WSL terminal. If you encounter connectivity issues, check the Windows Defender Firewall inbound rules to ensure that the NFS service is allowed through the network boundary. It is also critical to confirm that the NFS server exports the specific directory you intend to mount and that the client IP address is whitelisted in the server’s export configuration.

Installing NFS Client Tools in WSL

WSL distributions do not include NFS client utilities by default, so you must install them manually. The exact command depends on the Linux distribution you are running within WSL. For Ubuntu, Debian, and their derivatives, open your WSL terminal and run the following command to update your package lists and install the necessary components:
sudo apt update
sudo apt install nfs-common
For Fedora, CentOS, or RHEL-based distributions, use the appropriate package manager:
sudo dnf install nfs-utils
After installation, verify that the mount.nfs command is available by typing mount.nfs --version. This confirms that the system has the binary required to negotiate the NFS protocol with the remote server. Without this package, any attempt to mount an NFS share will result in a "command not found" error or a failure to recognize the NFS filesystem type.

Creating a Mount Point

Linux requires a local directory to serve as the entry point for the remote filesystem. Create a dedicated directory within your WSL home folder or another appropriate location in the Linux file system. Using a specific path helps keep your mounts organized and makes it easier to manage permissions later. Execute the following commands to create the directory and set appropriate ownership:
mkdir -p ~/mnt/nfs_share
sudo chown $USER:$USER ~/mnt/nfs_share
This directory, ~/mnt/nfs_share, will act as the bridge between your local WSL environment and the remote NFS data. Ensure that no other processes are currently using this path before proceeding.

Mounting the NFS Share

With the client tools installed and the mount point ready, you can now connect to the NFS server. Use the mount command with the -t nfs flag to specify the filesystem type. Replace <server_ip> with the actual IP address of your NFS server and <remote_path> with the exported directory path on that server.
sudo mount -t nfs : ~/mnt/nfs_share
If the connection is successful, you can verify the mount by running df -h or checking the contents of the mount directory with ls ~/mnt/nfs_share. You should see the files and directories exported by the NFS server. If you encounter permission errors, ensure that the user ID (UID) and group ID (GID) mapping between your WSL user and the NFS server matches, or use the uid and gid options in the mount command to force specific ownership.

Making the Mount Persistent

By default, mounts created via the command line are lost when the WSL instance shuts down. To make the NFS share persist across reboots, you need to add an entry to the /etc/fstab file. Open the fstab file with a text editor:
sudo nano /etc/fstab
Add the following line at the end of the file, replacing the placeholders with your specific details:
: /home//mnt/nfs_share nfs defaults,_netdev 0 0
The _netdev option tells the system that this is a network device and to delay mounting until the network is available. After saving the file, you can test the configuration by unmounting the current share and running sudo mount -a, which will attempt to mount all entries listed in fstab.

Troubleshooting Common Issues

If the mount fails, check the WSL logs located in /var/log/syslog or use dmesg to identify kernel-level errors. Common issues include incorrect NFS version negotiation; you can specify the version using the -o vers=3 or -o vers=4 flags if the default version fails. Additionally, ensure that the NFS server is not blocking the WSL2 virtual IP range. If you experience slow performance, consider adjusting the rsize and wsize parameters in the mount command to optimize data transfer sizes for your network latency. For more information on managing network connections in Windows, you might find our guide on closing listening ports useful, though this is distinct from NFS mounting.

Frequently Asked Questions

Can I mount an NFS share in WSL 1?

WSL 1 lacks full kernel support for mounting arbitrary filesystems like NFS directly. While you can access Windows drives, mounting remote NFS shares typically requires WSL 2 due to its Linux kernel capabilities. Attempting to use NFS commands in WSL 1 often results in compatibility errors or unsupported features.

Why is my NFS mount read-only?

A read-only mount usually indicates a permission mismatch between the WSL user and the NFS server’s export rules. Check the server’s configuration to ensure write access is granted for your client IP. You may also need to adjust the ro vs rw options in the mount command or the server’s exports file.

How do I unmount the NFS share?

To remove the mount, use the umount command followed by the mount point path. Run sudo umount ~/mnt/nfs_share to detach the filesystem. Ensure no active processes are using files within that directory before unmounting, as this will cause the operation to fail with a "device busy" error.

Does WSL 2 support NFSv4?

Yes, modern versions of WSL 2 fully support NFSv4. Most contemporary NFS servers default to NFSv4, and the nfs-common package includes the necessary clients to handle this protocol. If you encounter issues, explicitly specifying the version in the mount command can help resolve negotiation problems.

What happens to the mount if the network disconnects?

If the network drops while the share is mounted, subsequent file operations may hang or return errors. The _netdev option in fstab helps prevent automatic mounting during boot if the network is unavailable. During runtime, you may need to remount the share after the network connection is restored to regain access to the files.

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