Network File System (NFS) is a distributed file system protocol, It allows access to files over the network similar to local storage is accessed. It’s supported by Linux, Windows, and Mac. In the following few paragraphs, you will find steps on how to enable NFS services on windows and to allow Windows access NFS shares.
In this article, we will assume that there are two servers linuxsrv01 which is a Linux server that provides NFS services to your local network, and its counterpart winsrv01 is a windows server, hence we will configure that windows server to access the NFS shared storage.
this article is the opposite of mounting NTFS partition on Linux. as it allows windows to mount Linux Partitions over network.
Enable NFS support on Windows
Starting from Windows 2008, Windows started to support NFS protocol. However, this feature is not enabled by default. You just need to enable it from Windows feature, this feature enables Windows OS to access NFS protocol and even administer it. This feature called “Client for NFS”
Enable NFS support on windows 10:
Open Program and feature window from the control panel. Or just type “appwiz.cpl” in the Run window.
When the Program and Features windows appear to click on the upper left of the window you will find the line “Turn Windows feature on or off”. In the Windows Feature’s window scroll down till you find Services for NFS then check Client for NFS then click OK. The wizard will install the feature and It might require a restart.
Click on the picture to see screen recording showing how to do it.
Your Windows 10 now supports NFS.
Enable NFS support on Windows Server:
On Windows server, you can enable NFS feature by accessing the Server Manager
- Click on Manage then Click on Add Roles and Features.
- The Add Roles and Features Wizard will open.
- In Installation Type, Server Selection, and Server Roles sections just click Next.
- In features section check “Client for NFS” click Next.
- Click Install.
Click on the below image to see a recording of how to enable NFS on Windows server.
Your Windows server now supports NFS.
Mount the NFS share into Windows folder.
Here you have two choices to of mount the shared folder
Option 1: Assign a letter to it like E: or z: to look like a local drive.
Option 2: mount it into a Folder and access it through the existing drive, by giving it a name. example:
Option 1: Mount NFS shares as a disk.
Execute one the following command from the command prompt
net use <DriveLetter> \\<hostname>\path\to\share
net use x: \\wdmycloud\nfs\mysharedfolder
mount \\<hostname or IP >\path\to\share [<DriveLetter>]
mount \\192.168.43.57\nfs\mysharedfolder x:
if NFS share requires username and password
mount [-u:username] [-p:<password] \\<hostname>\path\to\share [<DriveLetter>]
Option 2: Mount NFS shares as a Folder.
Execute the following command (from elevated CMD):
mklink /D [LinkLocation] [share location]
mklink /D C:\my_link2myshare \\192.168.10.15\mysharedFolder
The conclusion, there are many ways to access NFS shares. each method has its advantages. I prefer mounting the share into a folder because it allows me to access that share through Remote desktop unlike mounting it as a normal drive.