Skip to content

Samba and NFS for Mere Mortals

Two protocols own the job of sharing folders over a network — making files on one machine appear, live, on another:

  • Samba speaks SMB, the Windows file-sharing protocol, from Linux — so Windows, macOS, and Linux can all meet at the same folder.
  • NFS is the Unix-native equivalent: Linux and Unix machines exporting directories to each other, simply and fast.

This guide sets both up for real, explains the permission models that make them confusing, and says plainly when a share is the wrong tool entirely.

It assumes you use a terminal and have edited config files before. Networking basics (what an IP address and a port are) are assumed; everything about shares, exports, and mounts is explained from zero.

What this guide covers

What it doesn't cover

Active Directory domains (Samba as a domain controller is a book of its own), clustered filesystems, and performance tuning beyond mortal needs.

How to use this guide

The Samba half was run for real (Samba 4.19): a share was configured, validated with testparm, and used — files moved both ways through smbclient, and the classic failures (wrong password, denied guest, read-only write) were produced and are quoted verbatim. The NFS export side was likewise configured and verified with exportfs. One boundary, stated plainly: the test machine's kernel had no CIFS or NFS modules, so actually mounting shares there failed with errors that are themselves reproduced in Troubleshooting — mount procedures are marked (documented), as are Windows/macOS client steps.


Part of the series

This guide is one of the For Mere Mortals guides: plain-language guides to the tools programmers and makers use.

Related guides:

License

The writing in this guide is licensed under CC BY 4.0. Code examples and lab scripts are licensed under the MIT License.