On this page:
Network File System (NFS) is a network file system protocol that allows a user on a client computer to access files over a network as easily as if the network devices were attached to its local disks. In more complex networks it can be easier to automate attaching of remote NFS disks via mechanism like autofs (it can e.g. solve server/client boot order dependency present in /etc/fstab method).This guide details NFS File sharing between MX Linux and another Linux computer. It does not provide security–that is, no login is required on any machine on the network to see the shares.
nfs-common and nfs-kernel-server are installed in MX Linux. They should be installed on the Linux machine you intend to share with. If that machine is only to be the client then only nfs-common needs to be installed.
For the Server
One computer must be designated as the server, and then set up as follows:
- As user, make the share directory on the server, where share is the name of the folder you are sharing. The share folder must have read/write permissions for All.
- As root edit /etc/exports adding a line containing your share. This line will vary depending on your goal. Note that the first three digits of the IP address may be different and should match your network. The last digits is the IP address of your client.
–For everyone read/write:
–For one specific device read/write:
–For a network read/write:
–For one specific device read/write for network read only:
- Export your shares. This makes them visible on the network.
service nfs-kernel-server restart
update-rc.d nfs-kernel-server defaults
For the Client
Take the following steps by opening a root terminal.
- Make the mount point.
- Mount the server share to the directory
mount <server_ip_address>:/<server_share_name> /media/nfs-server
The folder share in your home directory can now be seen by the client in your file manager.
1. To make this a permanent mounted share, edit, on your client, /etc/fstab as root as follows:
<server_ip_address>:/<server_share_name> /media/nfs-server nfs rw 0 0
2. The server setup can be done on any client machine on the network as well to set up two way sharing.