Bog'liq Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)
[ 303 ] It's also not accurate to say that Windows systems cannot access NFS shares, because
some versions actually can. By default, no version of Windows supports NFS
outright, but some editions offer a plugin you can install that enables this support.
The name of the NFS plugin in Windows has changed from one version to another
(such as
Services for UNIX ,
Subsystem for UNIX-based Applications ,
NFS Client ,
and most recently,
Windows Subsystem for Linux ) but the idea is the same. In
the past, Microsoft required a more expensive Windows license on your laptop
or desktop to allow the installation of the NFS client, but that's no longer the case.
The Windows Subsystem for Linux can be installed on any version of Windows 10,
so this licensing restriction only comes into play on older versions. If you do have
legacy Windows machines in use (which is becoming increasingly rare), using NFS
may actually increase costs. In that situation, Samba is a clear winner.
Regarding an all-Linux environment or a situation where you only have Linux
machines that need to access your shares, NFS is a great choice because it integrates
much more tightly with the rest of the distribution. Permissions can be more easily
enforced and, depending on your hardware, performance may be higher. The
specifics of your computing environment will ultimately make your decision for you.
Perhaps you'll choose Samba for your mixed environment, or NFS for your all-Linux
environment. Maybe you'll even set up both NFS and Samba, having shares available
for each platform. My recommendation is to learn and practice both, since you'll use
both solutions at one point or another during your career anyway.
Before you continue to the sections on setting up Samba and NFS, I recommend you
first decide where in your filesystem you'd like to act as a parent directory for your
file shares. This isn't actually
required, but I think it makes for better organization.
There is no one right place to store your shares, but personally I like to create a
/share
directory at the
root
filesystem and create sub-directories for my network
shares within it. For example, I can create
/share/documents
,
/share/public
, and so
on for Samba shares. With regard to NFS, I usually create shared directories within
/exports
. You can choose how to set up your directory structure. As you read the
remainder of this chapter, make sure to change my example paths to match yours
if you use a different style.