Windows 10 Nfs Client

It is easy to mount a drive from Linux NFS share on Windows 10 machine. To do that make sure you have NFS Client (Services for NFS) is installed from Programs and Features. Following is the command. NFS Client Configuration on Windows 10 Pro. Integrating Windows to use NFS is a little more tricky. You may notice I wrote this part of the how-to with screenshots rather than text descriptions. Personally I primarily use Linux for any real systems work beyond spreadsheets and browsing.

In this short guide I will talk about how to mount a shared drive that is in an Ubuntu or Debian installation that will be the server with the NFS (Network File System) drive, on a network drive accessible from Windows 10 who will play the role of client.

Table of Contents

  1. Installation and configuration in Ubuntu or Debian as a server
  2. Client installation and configuration in Windows 10

1. Installation and configuration in Ubuntu or Debian as a server

In the case of Debian, remove sudo in each command (it can even be executed the same).

Install the package 'nfs-kernel-server':

1.1. Drive options

Then we edit the file /etc/exports with nano or with the editor of our preference:

The file contains comments such as the following:

We add a line at the end with the following:

In the example above:

/home/user/folder it is the folder that will be shared by the network.

192.168.0.10 it is the IP of the client or clients that access the network resource. Only a static IP is shown, but we can use 192.168.0.1/24 to match between 192.168.0.1 and 192.168.0.254.

Mount options are in parentheses.

  • rw: allow reading and writing.
  • sync: is optional in case we want a little more file integrity and avoid data loss, sacrificing a bit of performance.
  • all_squash: downgrades the permissions of the files created from the client to the nobody user. For example, if in Windows 10 I am logged in as Administrator and created a new file, it will belong to user nobody.
  • anonuid: is the ID of the nobody user, or whatever user we want.
  • anongid: is The group ID of the user nobody.

In this case I set anonuid and anongid to 1000, which is the user who owns the folder, /home/user/folder to preserve execute and write permissions.

With the changes made we save the file CTRL + O, then Enter, and then we close with CTRL + X, this only if we use the nano editor from the terminal.

We restart the NFS server:

With this, the configuration on the server will be ready, any error that appears when restarting is necessary to check the configuration and obviously the description of the error.

Windows

2. Client installation and configuration in Windows 10

Windows comes with a default client, but it needs to be installed, the only detail is that I don't remember if it is available in the Windows 10 Home version.

The easiest way to install it is to use the search bar and type Control Panel, because Windows 10 has several modern panels that hide the older options. Open ProgramsPrograms and Features and in the left panel we open Turn Windows features on or off.

Mark the box Service for NFS with his two descendants Client for NFS and Administrative Tools. We click on OK and after some time the client will be installed.

2.1. Mounting the network drive

To mount the unit, we open the cmd (do not use PowerShell). We use the command:

The IP 192.168.0.20 is the server, followed by the shared folder and one drive letter that will be used. It is important to use the real full path of the resource as if we were personally on the server with the folder /home/user/folder, otherwise it won't work. I have tried hiding the part of the path when mounting the drive, but it is a complicated process and not worth the extra effort.

The message, The command completed successfully. will indicate that everything is working properly.

2.2. Write permissions for the anonymous user

Normally and by default, Windows does not allow writing to this type of drives with the anonymous user. To enable writing, we have to open the Windows registry Regedit, and we headed towards: HKEY_LOCAL_MACHINESOFTWAREMicrosoftClientForNFSCurrentVersionDefault.

There we will create a DWORD (32-bit) Value with the name AnonymousUid with the value of 0 with Base Decimal. Then create a DWORD (32-bit) Value with the name AnonymousGid with the value 0 with Base Decimal.

We have to restart the computer or the service Client for NFS, we can find it in the task manager in the Services tab.

If we follow all the previous steps, and we already have the unit mounted, we open the CMD and execute the command mount, the mount will appear and in properties it will show UID=0 y GID=0. If any other number appears, check the entire procedure above.

Notes: The procedure is practically the same in both Ubuntu and Debian, or any other variation like Kubuntu. No need to use Ubuntu Server. The NFS version to be used is 3 with Ubuntu 18.04 - 64-bits and Windows 10.

Learning has never been so easy!

We had two NFS shares that we needed to allow windows user's to connect (if it was possible) after some hassle it was.

This is specifically for a machine that is not on an active directory domain or if you do not want to set up the AD identity service.

I have tested this functionality in Windows 7 SP1, Windows 8.1 and Windows 10 Anniversary edition.

** All OSes tested were enterprise edition. i believe all versions of 8 and 10 have this available but win 7 is enterprise only **

10 Steps total

Step 1: Go to windows add or remove features

Step 2: Under Services for NFS click on NFS Client for Windows

Step 3: Once the package installs follow these instructions

Find your linux UID and GID by typing the following on your linux server.

Id -USERNAME
this will print your uid and gid

Step 4: Once you have this information you will need to add/modify two registry keys:

*** Alternative Copy after this line to a text file and name it with a .reg extension and run it.***

Windows

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftClientForNFSCurrentVersionDefault]
'AnonymousGid'=dword:00000000
'AnonymousUid'=dword:00000000

Step 5: Make sure to edit the IDs before importing

This binary calculator can help convert a decimal number (the number you got from the id command) to hexadecimal which is the format the is required for the windows registry key.

http://www.binaryhexconverter.com/decimal-to-hex-converter

Alternatively, you can run or add the registry keys above by navigating to the location mentioned in the windows registry, when editing the registry key, make sure the decimal radio button is checked.

Step 6: Reboot!!

Yes i mean it, if not your NFS Client wills till use the old Anonymous IDs and will not allow you to connect if you dont allow anonymous connections

Step 7: Mounting NFS Share:

This step and forward is just instructions on mounting the share as it should now be accessible.

Windows 10 Nfs Client Download

Step 8: Run a windows command prompt window.

Step 9: Type the following

mount -o nolock share:/SHAREPATH {desired drive letter}

Step 10: If you are mounting to the root of the share location, type in

Mount -o nolock share:/! {desired drive letter}

Windows 10 Nfs Client Version

it is very important to put the ! As the connection will not work without it.

Published: Nov 04, 2016 · Last Updated: Nov 09, 2016

10 Comments

  • Cayenne
    SBS0518 Nov 4, 2016 at 07:20pm

    I'm on 7, SP1 but the NFS option isn't listed.

  • Serrano
    Xylems92 Nov 4, 2016 at 08:07pm

    Ill attach a screen shot of what it looks like and the version of windows 7 i am running.

  • Serrano
    JM0176 Nov 4, 2016 at 08:08pm

    its pretty straight forward i'm not a huge linux user myself only our guys who code really use linux. But its cool to know if we need to access and of our servers this way.

  • Serrano
    Xylems92 Nov 4, 2016 at 08:11pm

    SBS0518: As far as the screen shot ill just leave it out. I changed the wording the options is not called NFS services its called Services for NFS so alphabetically look for S not N.

    The version of windows i am testing this on is : Windows 7 SP 1 Ver 6.1.7601

  • Serrano
    JoshScott9 Nov 4, 2016 at 08:50pm

    You need Windows 7 Enterprise for NFS Client. They took it out of Windows 7 Pro. Or else you can use a third-party option.

  • Serrano
    jorgealdana Nov 4, 2016 at 08:54pm

    SBS0518, You need the Enterprise version of Win7 to have the NFS features, Pro does not have it.

  • Serrano
    Xylems92 Nov 4, 2016 at 08:57pm

    Well there you have it. i never looked because we use enterprise here

  • Jalapeno
    gunnermike53 Nov 4, 2016 at 08:59pm

    I'm a little confuse. Why wouldn't you just map a drive

    ip addressshare folder

    UN: domainusername
    PW: whatever

  • Mace
    bbigford Nov 4, 2016 at 10:25pm

    @mchance2, you're thinking of SMB (Server Message Block). That's for windows. NFS (Network File System) is what *nix uses primarily. If you try to connect to a *nix share the way you're suggesting, it won't work.

  • Jalapeno
    MassT Nov 7, 2016 at 09:50pm

    What there is an NFS client in Windows! Thank you very much for info.