Migrate to RunxBuild and earn up to $50 in hosting credit on your first deposit.

Calculate your savings
unxBuild

Mounting an NFS Share in Linux: Command, fstab, and NFSv4

Sean

Platform Writer

Jul 06, 2026
4 min read

Mount an NFS share in Linux with mount -t nfs server:/path /mnt for a one-off, and add it to /etc/fstab with _netdev and nofail for a persistent mount. The right NFSv4 syntax is -t nfs4 and a single leading slash.

Mounting an NFS Share in Linux: Command, fstab, and NFSv4

Table of contents

The right mount command

sudo mount -t nfs server:/path /mnt/nfs for NFSv3. sudo mount -t nfs4 server:/ /mnt/nfs for NFSv4.

The right fstab entry

The right entry:

server:/export  /mnt/nfs  nfs  defaults,_netdev,nofail  0  0

The right options

The right options are _netdev (wait for the network) and nofail (continue boot if the mount fails). The wrong answer is to omit either.

Verifying

mount | grep nfs to see active mounts, df -h /mnt/nfs to see disk space.

FAQ

What is the right NFS version?

NFSv4.2 for new deployments. NFSv3 for legacy.

Can I mount as a non-root user?

Yes, with the user option in fstab.

How do I unmount?

sudo umount /mnt/nfs for normal, sudo umount -l for lazy.

What is the difference between hard and soft mount?

Hard retries indefinitely. Soft returns an error after a timeout. The right answer is hard.

If you are sizing the infrastructure for the kind of project this post covers, the RunxBuild hosting calculator is the right place to model the line items. The compute, the memory, the storage, the bandwidth, the database - each one is a separate number, and the team’s mental model for the platform is the sum of those numbers. The RunxBuild dashboard is where the team sees the actual usage in one place.

Useful related references:

#linux#mounting#dev-infra#tutorial