Skip to content

Linux NFS Guide

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux NFS Guide

Complete beginner-friendly guide to NFS on Linux, covering Arch Linux, CachyOS, and other distributions including installation, configuration, and network file sharing.


Table of Contents

  1. NFS Installation
  2. NFS Server Setup
  3. NFS Client Setup
  4. Mounting NFS
  5. Troubleshooting

NFS Installation

Install NFS Server

Arch/CachyOS:

# Install NFS server
sudo pacman -S nfs-utils

# Enable services
sudo systemctl enable --now nfs-server

Debian/Ubuntu:

sudo apt install nfs-kernel-server

Fedora:

sudo dnf install nfs-utils

Install NFS Client

Client:

# Install NFS client
sudo pacman -S nfs-utils

# Enable service
sudo systemctl enable --now rpcbind

NFS Server Setup

Configure Exports

Edit exports:

# Edit exports file
sudo vim /etc/exports

Add:

/srv/nfs/share 192.168.1.0/24(rw,sync,no_subtree_check)

Export Shares

Export shares:

# Export shares
sudo exportfs -ra

# List exports
exportfs -v

NFS Client Setup

Mount NFS

Mount share:

# Mount NFS
sudo mount -t nfs server:/srv/nfs/share /mnt/nfs

# Or using mount command
sudo mount server:/srv/nfs/share /mnt/nfs

Auto-mount

fstab entry:

# Edit fstab
sudo vim /etc/fstab

Add:

server:/srv/nfs/share  /mnt/nfs  nfs  defaults  0  0

Troubleshooting

NFS Not Working

Check service:

# Check server
systemctl status nfs-server

# Check exports
exportfs -v

# Check client
showmount -e server

Mount Errors

Check connection:

# Test connection
ping server

# Check NFS
rpcinfo -p server

Summary

This guide covered NFS installation, server/client setup, and mounting for Arch Linux, CachyOS, and other distributions.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally