[vc_row][vc_column width="3/4"][vc_column_text]In this article, we will learn how to install NFS on Ubuntu 16.04Network File System (NFS) protocol and a filesystem which allows you to access the shared folders from the┬áremote system or server and also allows you to mount as a remote directory on the servers. This allows you┬áto share the storage space between different clients in different locations. NFS has been always the easiest way to access the remote storages over a network.

<strong>NFS┬á</strong>( Network file systems ) is used to share files with other computers over the network. It is mainly used for centralized home folders.

To accomplish this demo, we need two systems which Ubuntu installed and user with sudo permissions with a private network.[/vc_column_text][vc_custom_heading stm_title_font_weight="500" text="Setup NFS server on ubuntu 14.04" font_container="tag:h4|text_align:left" google_fonts="font_family:Ubuntu%3A300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic|font_style:400%20regular%3A400%3Anormal"][vc_tta_accordion][vc_tta_section title="Step 1 ┬╗ Update the repositories." tab_id="1522223448415-161a1f70-8c52"][vc_column_text css=".vc_custom_1522223673524{padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #000000 !important;}"]<span style="color: #ffffff;">sudo apt-get update</span>[/vc_column_text][/vc_tta_section][vc_tta_section title="Step 2 ┬╗ Install nfs server package by typing the command." tab_id="1522223448463-3fa88ba6-cef8"][vc_column_text css=".vc_custom_1522223920389{padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #000000 !important;}"]<span style="color: #ffffff;">sudo apt-get install nfs-kernel-server</span>[/vc_column_text][/vc_tta_section][vc_tta_section title="Step 3 ┬╗ Make directory you want to share with other computers." tab_id="1522223846634-1ed8285d-c312"][vc_column_text css=".vc_custom_1522224021033{padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #000000 !important;}"]<span style="color: #ffffff;">sudo mkdir /shome</span>[/vc_column_text][/vc_tta_section][vc_tta_section title="Step 4 ┬╗ Here /etc/exports is the main config file for NFS. " tab_id="1522224062093-051a4dec-fbd4"][vc_column_text css=".vc_custom_1522224144766{padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #000000 !important;}"]<span style="color: #ffffff;">#Share access to all networks</span>
<span style="color: #ffffff;">/shome *(rw,sync,no_root_squash)</span>
<span style="color: #ffffff;">#Share access to particular network</span>
<span style="color: #ffffff;">/shome1 192.168.1.1/24(rw,sync,no_root_squash)</span>
<span style="color: #ffffff;">#Share access to particular host</span>
<span style="color: #ffffff;">/shome2 host.example.com(rw,sync,no_root_squash)</span>
<span style="color: #ffffff;">/shome3 192.168.1.200(rw,sync,no_root_squash)</span>
<span style="color: #ffffff;">#Share access to all hosts in particular domain</span>
<span style="color: #ffffff;">/shome4 *.krizna.com(rw,sync,no_root_squash)</span>[/vc_column_text][/vc_tta_section][vc_tta_section title="Step 5 ┬╗ Start service by the below command." tab_id="1522224220750-9ce3cd81-fafb"][vc_column_text css=".vc_custom_1522224590832{padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #000000 !important;}"]<span style="color: #ffffff;">sudo /etc/init.d/nfs-kernel-server start</span>[/vc_column_text][/vc_tta_section][vc_tta_section title="Step 6 ┬╗ Now check the NFS share status." tab_id="1522224601191-9ab51255-d91c"][vc_column_text css=".vc_custom_1522224660694{padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #000000 !important;}"]<span style="color: #ffffff;">krizna@leela:~$ sudo exportfs -u</span>
<span style="color: #ffffff;">/shome1 192.168.1.1/24</span>
<span style="color: #ffffff;">/shome2 192.168.1.200</span>
<span style="color: #ffffff;">/shome3 *.krizna.com</span>
<span style="color: #ffffff;">/shome world</span>[/vc_column_text][/vc_tta_section][/vc_tta_accordion][/vc_column][vc_column width="1/4"][vc_raw_html]JTNDZGl2JTIwY2xhc3MlM0QlMjJ2Y193cF9jYXRlZ29yaWVzJTIwd3BiX2NvbnRlbnRfZWxlbWVudCUyMiUzRSUzQ2FzaWRlJTIwY2xhc3MlM0QlMjJ3aWR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