{"id":12005,"date":"2026-02-23T10:02:51","date_gmt":"2026-02-23T04:32:51","guid":{"rendered":"https:\/\/www.youstable.com\/blog\/?p=12005"},"modified":"2026-04-16T12:34:12","modified_gmt":"2026-04-16T07:04:12","slug":"what-is-nfs-in-linux","status":"publish","type":"post","link":"https:\/\/www.youstable.com\/blog\/what-is-nfs-in-linux","title":{"rendered":"What is NSF in Linux {Network File System}"},"content":{"rendered":"\n<p><strong>NFS, or Network File System, in Linux lets you access and share files across a network just like they&#8217;re on your local drive.<\/strong>&nbsp;It&#8217;s a client server protocol originally created by Sun Microsystems in the 1980s. <\/p>\n\n\n\n<p>The server shares out directories, and clients connect to them remotely using RPC for communication and XDR for data formatting. You&#8217;ll see versions like NFSv3 (simple, works over UDP or TCP) and NFSv4 (more secure, TCP only with built in locking).<\/p>\n\n\n\n<p>Think of it as a shared network folder for your Linux setup, perfect for web hosting environments, WordPress clusters, or VPS servers. Whether you&#8217;re a beginner dipping into server management or a developer handling backups and code shares, NFS makes file access seamless without constant copying.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-does-nfs-actually-work\">How Does NFS Actually Work?<\/h2>\n\n\n\n<p><strong>At its core, NFS breaks down into a few key pieces that handle the magic:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>NFS Server<\/strong>: The machine holding the files you want to share, configured through a simple exports file.<\/li>\n\n\n\n<li><strong>NFS Client<\/strong>: Your machine that connects and mounts those remote folders.<\/li>\n\n\n\n<li><strong>RPC and rpcbind<\/strong>: The communication layer that matches requests to the right services.<\/li>\n\n\n\n<li><strong>Locking services<\/strong>: Prevent multiple users from editing the same file at once.<\/li>\n<\/ul>\n\n\n\n<p>Data zips over TCP or UDP, with NFSv4 bundling multiple requests into one for speed, great for crossing firewalls without headaches.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1600\" height=\"899\" src=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2026\/02\/How-Does-NFS-Actually-Work.webp\" alt=\"How Does NFS Actually Work\" class=\"wp-image-19994\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"nfs-versions-which-one-fits-your-needs\">NFS Versions: Which One Fits Your Needs?<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-center\" data-align=\"center\">Feature<\/th><th class=\"has-text-align-center\" data-align=\"center\">NFSv3<\/th><th class=\"has-text-align-center\" data-align=\"center\">NFSv4<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">State Tracking<\/td><td class=\"has-text-align-center\" data-align=\"center\">None (stateless)<\/td><td class=\"has-text-align-center\" data-align=\"center\">Tracks opens and locks<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Network Protocol<\/td><td class=\"has-text-align-center\" data-align=\"center\">UDP or TCP<\/td><td class=\"has-text-align-center\" data-align=\"center\">TCP only<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Security Options<\/td><td class=\"has-text-align-center\" data-align=\"center\">Basic user auth<\/td><td class=\"has-text-align-center\" data-align=\"center\">Kerberos, access control lists<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Locking<\/td><td class=\"has-text-align-center\" data-align=\"center\">Separate service<\/td><td class=\"has-text-align-center\" data-align=\"center\">Built right in<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Speed Across Nets<\/td><td class=\"has-text-align-center\" data-align=\"center\">Decent on LAN<\/td><td class=\"has-text-align-center\" data-align=\"center\">Better with compound operations<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Firewall Ease<\/td><td class=\"has-text-align-center\" data-align=\"center\">Needs multiple ports<\/td><td class=\"has-text-align-center\" data-align=\"center\">Single port (2049)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>NFS shines for quick LAN sharing but watch for security on wider networks, stick to private setups or VPNs.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"setting-up-an-nfs-server-on-ubuntu-step-by-step\">Setting Up an NFS Server on Ubuntu (Step by Step)<\/h2>\n\n\n\n<p>Let&#8217;s get hands on. These steps work great on Ubuntu or Debian based systems.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Install the server package<\/strong>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install nfs-kernel-server -y<\/code><\/pre>\n\n\n\n<p>2. <strong>Set up your share folder<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo mkdir -p \/mnt\/nfs_share<br>sudo chown nobody:nogroup \/mnt\/nfs_share<br>sudo chmod 777 \/mnt\/nfs_share<\/pre>\n\n\n\n<p>3. <strong>Edit the exports file<\/strong>&nbsp;(<code>sudonano \/etc\/exports<\/code>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/mnt\/nfs_share 192.168.1.0\/24(rw,sync,no_subtree_check)<\/code><\/pre>\n\n\n\n<p>Save, then apply:&nbsp;<code>sudo exportfs -ra<\/code>.<\/p>\n\n\n\n<p>4. <strong>Fire up the services<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable --now nfs-kernel-server rpcbind\nsudo systemctl status nfs-kernel-server<\/code><\/pre>\n\n\n\n<p>5. <strong>Check it&#8217;s working<\/strong>:&nbsp;<code>showmount -e localhost<\/code><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"mounting-nfs-shares-on-a-client-machine\">Mounting NFS Shares on a Client Machine<\/h2>\n\n\n\n<p>Now connect from another Linux box.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Grab the client tools<\/strong>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install nfs-common -y<\/code><\/pre>\n\n\n\n<p>2. <strong>Make a mount point<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo mkdir -p \/mnt\/nfs_client<\/pre>\n\n\n\n<p>3. <strong>Mount it up<\/strong>&nbsp;(replace&nbsp;<code>server_ip<\/code>&nbsp;with your server&#8217;s address):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mount -t nfs4 -o proto=tcp,port=2049 server_ip:\/mnt\/nfs_share \/mnt\/nfs_client<\/code><\/pre>\n\n\n\n<p>Check:&nbsp;<code>df -h | grep nfs<\/code>.<\/p>\n\n\n\n<p>4. <strong>Make it permanent<\/strong>&nbsp;(add to&nbsp;<code>\/etc\/fstab<\/code>):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">server_ip:\/mnt\/nfs_share \/mnt\/nfs_client nfs defaults 0 0<\/pre>\n\n\n\n<p>Reload:&nbsp;<code>sudo mount -a<\/code>.<\/p>\n\n\n\n<p>For WordPress folks, try mounting&nbsp;<code>\/wp-content\/uploads<\/code>&nbsp;this <a href=\"https:\/\/www.youstable.com\/blog\/fix-slow-wordpress-site\/\">way to share media across sites<\/a> effortlessly.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"fixing-common-nfs-hiccups\">Fixing Common NFS Hiccups<\/h2>\n\n\n\n<p>NFS can throw curveballs, here&#8217;s how to knock them out fast.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-center\" data-align=\"center\">Issue<\/th><th class=\"has-text-align-center\" data-align=\"center\">Quick Fix<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">&#8220;Stale File Handle&#8221;<\/td><td class=\"has-text-align-center\" data-align=\"center\"><code>umount -f \/mnt\/nfs_client<\/code>&nbsp;then remount<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">&#8220;RPC: Timed out&#8221;<\/td><td class=\"has-text-align-center\" data-align=\"center\">Ping server, check firewall:&nbsp;<code>ufw allow 2049\/tcp<\/code><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">&#8220;Permission Denied&#8221;<\/td><td class=\"has-text-align-center\" data-align=\"center\">Refresh exports:&nbsp;<code>exportfs -arv<\/code>, match UIDs<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Mount won&#8217;t stick (v4)<\/td><td class=\"has-text-align-center\" data-align=\"center\">Force v3:&nbsp;<code>mount -o vers=3 ...<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Test your setup:&nbsp;<code>touch \/mnt\/nfs_client\/test.txt<\/code>&nbsp;on client, verify on server. Run&nbsp;<code>nfsstat -c<\/code>&nbsp;for performance clues if it&#8217;s sluggish.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"when-makes-sense-to-use-nfs\">When Makes Sense to Use NFS?<\/h2>\n\n\n\n<p>Grab NFS for team code repos, centralized backups, or multi server WordPress deploys. Skip it over public internet opt for SFTP or secure alternatives. Pair with load balancers for rock solid availability.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"faqs\">FAQs<\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1765355768518\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"is-ghost-really-faster-than-wordpress\">Is Ghost really faster than WordPress?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes. Ghost\u2019s Node.js architecture and built in caching make it faster than most WordPress setups.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765355779483\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"what-ports-should-i-open-for-nfs\"><strong>What ports should I open for NFS?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Core ones: 2049 (TCP\/UDP) and 111 for rpcbind. Use\u00a0<code>ufw<\/code>\u00a0to allow them safely.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765355804201\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"can-ghost-replace-wordpress-completely\">Can Ghost replace WordPress completely?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Not for all use cases. It can replace WordPress for blogging and memberships but not eCommerce or complex websites.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765355819067\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"is-ghost-good-for-seo-compared-to-wordpress\">Is Ghost good for SEO compared to WordPress?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes. Ghost is strong out of the box for SEO, while WordPress needs plugins like RankMath.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>NFS in Linux remains a practical and efficient solution for sharing files across systems without the hassle of manual transfers. By allowing directories to be accessed over a network as if they were local, it simplifies workflows for developers, system administrators, and hosting environments. From basic LAN file sharing to powering multi server setups like WordPress clusters, NFS offers flexibility with versions like NFSv3 and the more secure, modern NFSv4.<\/p>\n\n\n\n<p>That said, proper configuration and security practices are essential, especially when extending beyond private networks. Using controlled access, firewalls, and secure authentication methods can help maintain stability and data protection. When set up correctly, NFS delivers a reliable, high-performance way to manage shared storage in Linux-based systems.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NFS, or Network File System, in Linux lets you access and share files across a network just like they&#8217;re on [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":19992,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1134],"tags":[],"class_list":["post-12005","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"acf":[],"featured_image_src":"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2026\/02\/What-is-nfs-in-linux-Network-File-System.jpg","author_info":{"display_name":"Prahlad Prajapati","author_link":"https:\/\/www.youstable.com\/blog\/author\/prahladblog"},"_links":{"self":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/12005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/comments?post=12005"}],"version-history":[{"count":4,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/12005\/revisions"}],"predecessor-version":[{"id":19995,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/12005\/revisions\/19995"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media\/19992"}],"wp:attachment":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media?parent=12005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/categories?post=12005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/tags?post=12005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}