Skip to content

Instantly share code, notes, and snippets.

@chenhengqi
Created May 16, 2021 01:59
Show Gist options
  • Save chenhengqi/e52d305dce88fc56521fcd284bece8ce to your computer and use it in GitHub Desktop.
Save chenhengqi/e52d305dce88fc56521fcd284bece8ce to your computer and use it in GitHub Desktop.
how to play with nfs

Server side

install NFS server, prepare share directory:

$ sudo apt install nfs-kernel-server
$ sudo mkdir -p /tmp/mynfsdir
$ sudo chown nobody:nogroup /tmp/mynfsdir

edit /etc/exports, add the following line:

/tmp/mynfsdir ${CLIENT_IP}(rw,sync,no_subtree_check)

start NFS server:

$ sudo systemctl restart nfs-kernel-server

Client side

$ sudo mount -t nfs ${SERVER_IP}:/tmp/mynfsdir /tmp/mynfsdir

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment