<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>how to install and configure nfs client on ubuntu Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/how-to-install-and-configure-nfs-client-on-ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 05 Mar 2020 21:45:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How To Install and Configure NFS Client on Ubuntu 18.04</title>
		<link>https://www.osradar.com/how-to-instll-and-configure-nfs-client-on-ubuntu-18-04/</link>
					<comments>https://www.osradar.com/how-to-instll-and-configure-nfs-client-on-ubuntu-18-04/#respond</comments>
		
		<dc:creator><![CDATA[sabi]]></dc:creator>
		<pubDate>Thu, 05 Mar 2020 09:35:30 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[configure nfs client on ubuntu 18.04]]></category>
		<category><![CDATA[how to install and configure nfs client on ubuntu]]></category>
		<category><![CDATA[nfs client configuration linux]]></category>
		<category><![CDATA[set up nfs server and nfs client]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=18543</guid>

					<description><![CDATA[<p>In previous tutorial we&#8217;ve cover the installation of NFS Server on Ubuntu. In this tutorial, you&#8217;ll cover only the configuration of NFS Client on Ubuntu 18.04. So, we already cover the introduction in the previous guide. Let&#8217;s start with some basic points. How NFS Client Works? NFS client firstly sends a request to the server [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-instll-and-configure-nfs-client-on-ubuntu-18-04/">How To Install and Configure NFS Client on Ubuntu 18.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In previous tutorial we&#8217;ve cover the installation of <a href="https://www.osradar.com/?p=18544">NFS Server on Ubuntu</a>. In this tutorial, you&#8217;ll cover only the configuration of NFS Client on Ubuntu 18.04. So, we already cover the introduction in the previous guide. Let&#8217;s start with some basic points.</p>



<h2><strong>How NFS Client Works?</strong></h2>



<p>NFS client firstly sends a request to the server &amp; mount a remote share that is provided. The permission is set by the NFS Server in ACL configuration file. You can allow or restrict any client that is illustrated in the previous post.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="973" height="345" src="https://www.osradar.com/wp-content/uploads/2020/03/nfs-server-and-nfs-client.png" alt="how to install and configure nfs client on ubuntu 18.04" class="wp-image-18804" srcset="https://www.osradar.com/wp-content/uploads/2020/03/nfs-server-and-nfs-client.png 973w, https://www.osradar.com/wp-content/uploads/2020/03/nfs-server-and-nfs-client-300x106.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/nfs-server-and-nfs-client-768x272.png 768w, https://www.osradar.com/wp-content/uploads/2020/03/nfs-server-and-nfs-client-696x247.png 696w" sizes="(max-width: 973px) 100vw, 973px" /></figure></div>



<h3><strong>Step 1: Install &amp; Configure NFS Server on Ubuntu 18.04</strong></h3>



<p>To Configure NFS Client on Ubuntu you must have installed the NFS Server. Visit the below link if you&#8217;ve not see the post </p>



<p><a href="https://www.osradar.com/?p=18544">How to install &amp; configure NFS Server on Ubuntu 18.04</a></p>



<h3><strong>Step 2: Install NFS Client on Ubuntu 18.04</strong></h3>



<p>First of all add the NFS Server DNS records to the <strong>/etc/hosts</strong> file on your client machine. If you want to use the direct IP address, you can skip this step.</p>



<pre class="wp-block-verse">sudo nano /etc/hosts<br>104.27.130.185 nfs-server.example.com nfs-server </pre>



<p>You can confirm that if the serve is reachable or not by typing</p>



<pre class="wp-block-verse">ping -c 1 nfs-server<br>PING nfs-server (104.27.130.185) 56(84) bytes of data.<br> 64 bytes from nfs-server ( 104.27.130.185): icmp_seq=1 ttl=64 time=0.693 ms<br> --- nfs-server ping statistics ---<br> 1 packets transmitted, 1 received, 0% packet loss, time 0ms<br> rtt min/avg/max/mdev = 0.693/0.693/0.693/0.000 ms</pre>



<p><strong>Note:</strong> Use the server name you&#8217;ve added earlier.</p>



<p>As NFS client and NFS Server uses the same parent package <strong>nfs-common</strong>. So, install it on your machine to acces NFS server shares by running</p>



<pre class="wp-block-verse">sudo apt -y install nfs-common</pre>



<p>And then update your domain name</p>



<pre class="wp-block-verse">sudo nano /etc/idmapd.conf<br>......<br>Domain = <a href="http://osradar.com">example.com</a></pre>



<h3><strong>Step 3: Monitor NFS Share on the Client</strong></h3>



<p>As we&#8217;ve configured the NFS Share earlier, so now we will mount on the Client.</p>



<h4><strong>Discover NFS Exports</strong></h4>



<p>First of all discover the NFS exports on NFSv3 or NFSv4 server. </p>



<p>For NFSv3 server use the <strong>showmount</strong> command </p>



<pre class="wp-block-verse">sudo showmount --exports nfs-server<br>Export list for nfs-server:<br> /data/nfshare  104.27.130.185 </pre>



<p><strong>Note:</strong> Replace the nfs-server with the NFS server IP address if name is not set </p>



<p>For NFSv4, you&#8217;ve to mount the root directory &amp; then look around the available folder shares.</p>



<pre class="wp-block-verse">sudo mount nfs-server:/ /mnt/<br>sudo apt -y install tree<br>tree /mnt/<br>/mnt/<br>└── data<br>     └── nfshare<br> 2 directories, 0 files</pre>



<p>If you&#8217;ve server that support both methods then you can use both commands &amp; the will work same.</p>



<h4><strong>Mount NFS share with mount</strong></h4>



<p>Use the mount utility to mount NFS share with the given command</p>



<pre class="wp-block-verse">mount -t nfs -o options host:/remote/export /local/directory</pre>



<ul><li><strong>options:</strong> used to specify different conditions or mount options.</li><li> <strong>host:</strong> the user or host or network or any domain where to export the file system is mounted.</li><li> <strong>/remote/export:</strong> Directory that is being exported.</li><li> <strong>/local/directory:</strong> client directory where remote direcotry is mounted.</li></ul>



<p>In our example, this will be</p>



<pre class="wp-block-verse">sudo unmount /mnt<br>sudo mount -t nfs -o nfsvers=4 nfs-server:/data/nfshare /mnt</pre>



<p>Check to confirm</p>



<pre class="wp-block-verse">df -hT | grep /mnt<br>nfs-server:/data/nfshare nfs4       40G  972M   18G   6% /mnt</pre>



<p>use the below command to see the all availabe options for mounting</p>



<pre class="wp-block-verse">man mount<br>man nfs</pre>



<h4><strong>Persist mount config in /etc/fstab</strong></h4>



<p>Configure the <strong>/etc/fstab </strong>to persist the changes across system reboots.</p>



<pre class="wp-block-verse">sudo nano /etc/fstab</pre>



<p>And then add the below line with the same syntax as given.</p>



<pre class="wp-block-verse">host:/remote/export  /local/directory   nfs defaults   0 0</pre>



<p>In my case it is</p>



<pre class="wp-block-verse">nfs-server:/data/nfshare  /mnt nfs defaults 0 0</pre>



<p>Now, verify your settings</p>



<pre class="wp-block-verse">sudo unmount /mnt<br> sudo mount -a<br> df -hT | grep /mnt<br>nfs-server:/data/nfshare nfs4       40G  972M   18G   6% /mnt</pre>



<p>Now, test the permissions</p>



<pre class="wp-block-verse">echo "Test file1" | sudo tee /mnt/testfile1<br>echo "Test file2" | sudo tee /mnt/testfile2</pre>



<p>You&#8217;ll see the file on NFS server block device.</p>



<pre class="wp-block-verse">sudo apt -y install tree<br>tree /data/nfshare<br>/data/nfshare/<br>  ├── testfile1<br>  └── testfile2<br>  0 directories, 2 files<br> $ cat /data/nfshare/testfile1 <br> Test file1<br> $ cat /data/nfshare/testfile2<br> Test file2</pre>



<p>So, this is how you can configure the NFS Client on Ubuntu 18.04.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-instll-and-configure-nfs-client-on-ubuntu-18-04/">How To Install and Configure NFS Client on Ubuntu 18.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-instll-and-configure-nfs-client-on-ubuntu-18-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
