Skip to main content

Command Palette

Search for a command to run...

How to Access Linux NFS Share from Windows 10

Updated
7 min read

Accessing a Linux NFS share from Windows 10 can seem tricky at first, but once you know the steps, it’s quite straightforward. If you work in a mixed environment with Linux servers and Windows clients, being able to share files seamlessly is essential. You might want to access files stored on a Linux machine directly from your Windows 10 PC without copying them over.

In this guide, I’ll walk you through how to set up and access Linux NFS shares from Windows 10. We’ll cover enabling NFS support on Windows, mounting the Linux share, and troubleshooting common issues. By the end, you’ll be able to connect to your Linux NFS shares smoothly and improve your workflow.

What is NFS and Why Use It?

NFS stands for Network File System. It’s a protocol originally developed for Unix and Linux systems to share files over a network. NFS allows multiple clients to access the same files on a server as if they were on their local drives.

Here’s why NFS is popular in Linux environments:

  • Efficient file sharing: NFS is designed for fast, low-latency access to files.
  • Supports permissions: It respects Linux file permissions and ownership.
  • Widely supported: Most Linux distributions come with built-in NFS server and client software.
  • Good for mixed environments: Windows 10 supports NFS clients, making it easier to share files with Linux servers.

While Windows typically uses SMB/CIFS for file sharing, NFS is often preferred in Linux-heavy networks for its performance and compatibility with Linux file systems.

Preparing Your Linux Server for NFS Sharing

Before you can access an NFS share from Windows 10, your Linux server must be set up correctly. Here’s what you need to do:

  1. Install NFS server packages:
    On most Linux distros, install the NFS server with a command like:

    sudo apt install nfs-kernel-server   # Debian/Ubuntu  
    sudo yum install nfs-utils            # CentOS/RHEL
    
  2. Create the shared directory:
    Choose or create a folder to share, for example:

    sudo mkdir -p /srv/nfs/share
    sudo chown nobody:nogroup /srv/nfs/share
    sudo chmod 755 /srv/nfs/share
    
  3. Configure exports:
    Edit the /etc/exports file to define which directories to share and with whom. For example:

    /srv/nfs/share 192.168.1.0/24(rw,sync,no_subtree_check)
    

    This shares the folder with all devices on the 192.168.1.x subnet with read-write access.

  4. Start and enable the NFS server:

    sudo systemctl restart nfs-kernel-server
    sudo systemctl enable nfs-kernel-server
    
  5. Allow NFS through the firewall:
    If you use ufw or firewalld, allow NFS traffic:

    sudo ufw allow from 192.168.1.0/24 to any port nfs
    

Once your Linux server is ready, you can move on to accessing the share from Windows 10.

Enabling NFS Client on Windows 10

Windows 10 doesn’t enable NFS client support by default. You need to turn it on manually:

  1. Open Windows Features:

    • Press Win + R, type optionalfeatures, and press Enter.
    • Scroll down and find Services for NFS or Client for NFS (depending on your Windows version).
  2. Enable Client for NFS:

    • Check the box next to Client for NFS.
    • Click OK and wait for Windows to install the feature.
    • Restart your computer if prompted.

This feature allows Windows to mount NFS shares and access files on Linux servers.

Mounting the Linux NFS Share on Windows 10

After enabling the NFS client, you can mount the Linux share using the command prompt or PowerShell.

Using Command Prompt

  1. Open Command Prompt as Administrator.

  2. Use the mount command with the following syntax:

    mount -o anon \\<Linux_Server_IP>\<NFS_Share> <Drive_Letter>:
    

    For example:

    mount -o anon \\192.168.1.100\srv\nfs\share Z:
    
  3. If successful, the Linux NFS share will appear as a new drive in File Explorer.

Important Notes:

  • The -o anon option mounts the share as an anonymous user, which works if your Linux share allows it.
  • If your Linux server requires specific user permissions, you may need to configure UID/GID mapping on Windows or adjust Linux export settings.
  • You can also use the net use command, but it’s mainly for SMB shares, so mount is preferred for NFS.

Using PowerShell

Alternatively, you can use PowerShell to mount the share:

New-PSDrive -Name Z -PSProvider FileSystem -Root \\192.168.1.100\srv\nfs\share -Persist

This command creates a persistent mapped drive to the NFS share.

Troubleshooting Common Issues

Sometimes, accessing Linux NFS shares from Windows 10 can run into problems. Here are common issues and how to fix them:

1. Access Denied or Permission Errors

  • Check the /etc/exports file on Linux to ensure your Windows IP is allowed.
  • Confirm the shared directory permissions allow access to the NFS client.
  • Use showmount -e <Linux_Server_IP> on Windows or Linux to verify exported shares.
  • Adjust Linux firewall rules to allow NFS traffic.

2. Mount Command Not Found

  • Make sure the NFS client feature is enabled in Windows Features.
  • Restart your PC after enabling the feature.

3. Drive Not Showing in File Explorer

  • Confirm the mount command succeeded without errors.
  • Try disconnecting and remounting the drive.
  • Use net use to check existing network drives and remove conflicts.

4. Slow Performance or Timeouts

  • Check network connectivity between Windows and Linux machines.
  • Use wired connections for better speed.
  • Verify NFS server settings for performance tuning.

5. UID/GID Mismatch Causing Permission Issues

  • Windows and Linux use different user ID systems.
  • Configure User Name Mapping on Windows or adjust Linux export options like all_squash and anonuid for better compatibility.

Alternatives to NFS for Windows-Linux File Sharing

If NFS setup seems complex or doesn’t fit your needs, consider these alternatives:

  • SMB/CIFS: The native Windows file sharing protocol. Linux servers can run Samba to share files with Windows easily.
  • SFTP or SCP: Secure file transfer protocols for copying files between systems.
  • FTP: Less secure but widely supported for file transfers.
  • Third-party tools: Apps like WinSCP or FileZilla provide graphical interfaces for accessing Linux files from Windows.

NFS is great for network-mounted drives with Linux permissions, but SMB is often simpler for Windows users.

Security Considerations When Using NFS

NFS was designed for trusted networks, so security is important:

  • Use firewalls to restrict NFS access to trusted IPs only.
  • Avoid exposing NFS shares directly to the internet.
  • Use NFSv4 where possible, as it supports stronger authentication.
  • Regularly update your Linux server and Windows client to patch vulnerabilities.
  • Consider VPNs or secure tunnels if accessing shares over untrusted networks.

Summary Table: Key Commands and Settings

TaskCommand / Setting Example
Install NFS server (Ubuntu)sudo apt install nfs-kernel-server
Export directory/srv/nfs/share 192.168.1.0/24(rw,sync,no_subtree_check)
Enable NFS client on WindowsEnable Client for NFS in Windows Features
Mount NFS share (CMD)mount -o anon \\192.168.1.100\srv\nfs\share Z:
Check exportsshowmount -e 192.168.1.100
Allow NFS in firewallsudo ufw allow from 192.168.1.0/24 to any port nfs

Conclusion

Accessing a Linux NFS share from Windows 10 is easier than you might think. By enabling the NFS client on Windows and properly configuring your Linux server, you can mount and use Linux shares just like local drives. This setup is perfect for mixed networks where Linux servers store files and Windows clients need quick access.

Remember to check permissions, firewall settings, and network connectivity if you run into issues. If NFS doesn’t meet your needs, SMB or other file-sharing methods can be good alternatives. With these steps, you’ll improve your file sharing workflow and make your Windows and Linux systems work better together.


FAQs

How do I enable NFS client on Windows 10?

Go to Windows Features by typing optionalfeatures in Run, then check Client for NFS. Click OK and restart your PC if needed.

Can Windows 10 access NFSv4 shares?

Yes, Windows 10 supports NFSv4, which offers better security and performance than earlier versions.

What permissions are needed on Linux for NFS sharing?

The shared directory should have read/write permissions for the NFS client user, and the /etc/exports file must allow the client’s IP.

Why does the mount command say access denied?

This usually means your Windows IP isn’t allowed in the Linux exports or directory permissions are too restrictive.

Is SMB better than NFS for Windows-Linux sharing?

SMB is easier to set up for Windows clients, but NFS is more efficient and compatible with Linux permissions. Choose based on your environment.

More from this blog

L

LinuxBloke | Linux Tips, Tricks & Troubleshooting

672 posts