EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 600+ Courses All in One Bundle
  • Login

NFS in Linux

By Priya PedamkarPriya Pedamkar

Home » Software Development » Software Development Tutorials » Linux Tutorial » NFS in Linux

nfs in linux

Introduction to NFS in Linux

Are you tired of having to copy files over two systems constantly? Why not mount your local file systems over a network and remote hosts to interact with them as they are mounted locally on the same system. Didn’t understand? In this post, we will be going over the basics of NFS in Linux.

NFS in Linux

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

Network File System as the name indicates is a way of mounting Linux directories over a network. It was basically developed to share files and folders between two Linux systems in a faster and better way. It was developed by Sun Microsystems in 1980 for this sole purpose. NFS uses Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) to provide a stateless connection between client and server.

Why Should We Use NFS?

As they say, sharing is caring. So, NFS is one of the best methods to share between to 2 Linux systems. The main purpose of NFS is back up data into a central server that is accessible to all PCs in a network. Instead of copying a file from a system to a system, it’s easier to create NFS so that all PCs have access to that file. Newer versions of NFS also support ACL, pseudo root mounts. The best part is there is manual refreshing required to see new files. Also, it can be secured with Firewalls and Kerberos.

When Should We Use NFS?

It can be used whenever sharing has to be done among Linux systems. To share between a Windows PC and a Linux use Samba on the Windows side. Yea that’s as simple as that!!

How to Setup NFS in Your Linux System?

First things first, install packages for NFS using the command “sudo apt-get install NFS-kernel-server” on the terminal.

NFS in Linux-1.1

If a command is correct, you will be able to see something like this in the terminal, wait for the installation to be over

Popular Course in this category
Linux Training Program (16 Courses, 3+ Projects)16 Online Courses | 3 Hands-on Projects | 160+ Hours | Verifiable Certificate of Completion | Lifetime Access
4.5 (6,013 ratings)
Course Price

View Course

Related Courses
Kali Linux Training (3 Courses, 3+ Projects)Red Hat Linux Training Program (4 Courses, 1+ Projects)

NFS in Linux-1.2

1. Make a folder that needs to be shared. Example: I have created a folder named “nfs_arjun”

NFS in Linux-1.3

2. Edit exports file in /etc with your favorite text editor. If you are not in root mode, use sudo while editing.

NFS in Linux-1.4

3. Add the following line to the exports file in the format

“folder_to_shared” “ip”(specify access and other sharing options in this bracket)

NFS in Linux-1.5

4. Save the edit done to exports file and run the command “exportfs –r”

NFS in Linux-1.6

5. Start NFS service by executing the following command “/etc/init.d/nfs start”

Terminal-1.7

6. Just to make sure your NFS share is visible to the client, run the following command on the NFS server.

Terminal-1.8

7. If your export list shows your folder and IP address, Voila you did it!!

Now all you have to do is mount it and its ready to use.

How to Setup NFS in Between a Linux System and a Windows System?

Now let us learn how to set up NFS between Linux and Windows system. After setting up NFS on the Linux side, enable the features for NFS in Windows.

Open Start > Control Panel > Programs. Select Turn Windows Features on or off. Select Services for NFS. Click OK

We can use the “mount” command to use NFS on windows systems. Also, provide the “nolock” option and other parameters like remote NFS server IP address and local drive which is “Z” here.

mount -o nolock 172.16.3.56:/mnt z:

Command Prompt-1.9

We can also use “net use” to mount NFS onto Windows system by using command

net use z: \\172.16.3.56\mnt

NFS in Linux-1.10

Conclusion

It is one of the most useful things that you can learn to do. It helps a lot when you have to share a file/folder with multiple PCs. You just learned fundamentals and How to set it up nfs mount in Linux and mount it onto other systems.

Recommended Articles

This is a guide to NFS in Linux. Here we discuss how to set up NFS in your Linux system? along with why and when should we use NFS? respectively. You may also look at the following articles to learn more –

  1. Install Python on Linux
  2. Create User in Linux
  3. Linux Process Management
  4. Linux Operators

Linux Training Program (16 Courses, 3+ Projects)

16 Online Courses

3 Hands-on Projects

160+ Hours

Verifiable Certificate of Completion

Lifetime Access

Learn More

0 Shares
Share
Tweet
Share
Primary Sidebar
Linux Tutorial
  • Advanced
    • Install VMware
    • Install GRUB
    • Chown Command in Linux
    • Linux Network Command
    • Configuring Linux Network Environment
    • DNS Configuration in Linux
    • Linux Users
    • Create User in Linux
    • DHCP Server in Linux
    • FTP Server in Linux
    • Linux Regular Expression
    • IP Command in Linux
    • Set IP Address in Linux
    • Tar Command in Linux
    • Dynamic Host Configuration Protocol
    • Linux Kill Signals
    • Linux File Permissions
    • Linux File System
    • Linux Create File
    • Linux Concatenate Files
    • Linux Join
    • Linux Process Management
    • Linux Proxy Server
    • Linux System Commands
    • Linux System Logging
    • NFS in Linux
    • Linux LVM
    • Linux Repository
    • Samba Server in Linux
    • Top Commands in Linux
    • Types of Shells in Linux
    • Shell Script Types For Linux
    • GCC Command in Linux
    • Monolithic Kernel
    • YARN Package Manager
    • Linux Sed Replace
    • Linux List Groups
    • Linux Container
    • Linux Find File by Name
    • Create Folder in Linux
    • Linux Move Folder
    • Linux Error Codes
    • Linux Automount
    • Linux HugePages
  • Basic
    • Introduction to Linux
    • What is Linux
    • Careers in Linux
    • How to Install Linux
    • How to Install Ubuntu
    • How to Install Ubuntu Server
    • How To Install Debian
    • Advantage Of Linux
    • What is Raid in Linux
    • What is Raid 5?
    • Raid 5 vs Raid 6
    • Careers in Linux Administration
    • What is Shell in Linux?
    • Bash Shell in Linux
    • Linux Emulator
    • Linux Operators
    • Linux Apps
    • Linux Keyboard Shortcuts
    • Linux Crontab
    • What is Raid Storage
    • What is Vmware
    • What is RedHat
    • What is Debian
    • Uses of Ubuntu
    • Career In RedHat
    • Linux Distributions
    • Linux From Scratch
    • Linux Format
    • Cheat Sheet Linux
  • Linux Commands
    • CAT Command in Linux
    • PS command in Linux
    • Mkdir Command in Linux
    • rmdir command in Linux
    • mv command in Linux
    • Linux rm Command
    • CHMOD Command in Linux
    • Zip Command in Linux
    • Linux Route Command
    • SCP Command in Linux
    • du Command in Linux
    • Less Command in Linux
    • Copy Command in Linux
    • Head Command in Linux
    • Help Command in Linux
    • Linux History Command
    • hostname Command in Linux
    • GREP Command in Linux
    • Linux Curl Command
    • Linux List Users
    • Linux List Directories
    • Linux Directory Permissions
    • Find Directory Linux
    • Linux User Permission
    • Linux Add User
    • Linux Delete User
    • Linux uniq
    • Linux Filter Commands
    • Linux sort Command
    • Linux Sort by Size
    • Remove dir Linux
    • Linux tr Command
    • Linux Touch Command
    • Linux More Command
    • Linux Cal Command
    • Linux OD
    • Linux Zcat
    • Linux tracepath
    • Linux Sleep
    • Linux bg Command
    • Linux WC
    • Linux Read
    • Linux Write
    • Linux Rename Command
    • Linux Free Command
    • Linux tac
    • Linux Shred
    • Linux wget
    • Linux Date
    • Linux Untar
    • Linux JQ
    • Linux Xargs
    • Linux Mount Command
    • Linux mdadm
    • Linux comm
    • Linux tee Command
    • Tail Command in Linux
    • Linux gzip
    • Linux Directory Structure
    • Linux Alias Command
    • Linux Inode
    • Linux Ping
    • Linux Watch Command
    • Linux Split Command
    • Linux Size
    • Linux Network Stack
    • Linux Diff Command
    • Vim Command in Linux
    • Linux nslookup
  • Kali Linux
    • Install Kali Linux
    • Kali Linux Uses
    • Kali Linux Commands
    • Kali Linux Repository
    • Kali Linux Packages
    • Kali Linux root password
    • Kali Linux Alternative
  • Interview Questions
    • Linux Interview Questions
    • Linux System Administration Interview
    • Red Hat Interview Questions

Related Courses

Kali Linux Training

Linux Training Course

Red Hat Training Course

Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Java Tutorials
  • Python Tutorials
  • All Tutorials
Certification Courses
  • All Courses
  • Software Development Course - All in One Bundle
  • Become a Python Developer
  • Java Course
  • Become a Selenium Automation Tester
  • Become an IoT Developer
  • ASP.NET Course
  • VB.NET Course
  • PHP Course

© 2020 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA Login

Forgot Password?

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you
Book Your One Instructor : One Learner Free Class

Let’s Get Started

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

Special Offer - Linux Training Program (16 Courses, 3+ Projects) Learn More