Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1
configure   the firewall,   use Uncomplicated Firewall  (UFW)   as  described   in
Chapter 20, “Securing Your Machines.”

Using Network File System


Network File System (NFS) is a protocol developed by Sun Microsystems that
enables computers to use a remote file system as if it were a real part of the
local machine. A common use of NFS is to allow users’ /home directories to
appear on every local machine they use, thus eliminating the need to have
physical home directories. This opens up hot desking and other flexible
working arrangements, especially because no matter where the users are, their
/home directories follow them around.


Another popular use for NFS is to share binary files between similar
computers. If you have a new version of a package that you want all machines
to have, you have to upgrade only on the NFS server, and all hosts running
the same version of Ubuntu have the same upgraded package.


Installing and Starting or Stopping NFS


NFS is not installed by default on Ubuntu, so you need to install the nfs-
kernel-server package. NFS itself consists of several programs that
work together. One is portmap, which maps NFS requests to the correct
daemon. Two others are nfsd, which is the NFS daemon, and mountd,
which controls the mounting and unmounting of file systems.


Ubuntu automatically adds NFS to the system startup scripts, so it will always
be available after you have configured it. To check this, use the command
sudo /etc/init.d/nfs-kernel-server status, and you see
that the service is running. If you need to manually start the NFS server, use
the following command:


Click here to view code image
matthew@seymour:~$ sudo /etc/init.d/nfs-kernel-server start



  • Exporting directories for NFS kernel daemon: [ OK ]
    Starting NFS kernel daemon: [ OK ]


In this example, NFS has been started. Use stop to stop the service or
restart to restart the service. This approach to controlling NFS is handy,
especially after configuration changes have been made. See the next section
on how to configure NFS support on your Ubuntu system.

Free download pdf