DEV Community

Zen Oh
Zen Oh

Posted on

Example NFS configuration between Mac (Host) and Ubuntu VM (Client)

Configure the nfs export configuration in this file for Mac with this value:

#file: /etc/exports

/<path-to-share> -mapall=501:20 192.168.1.2 192.168.1.3 192.168.1.4
Enter fullscreen mode Exit fullscreen mode

501 should be your default user id in your Mac and 20 should be default group id (staff) in your Mac. The ip should be list of allowed ip to access the NFS.

Configure the nfs mount configuration in this file for Ubuntu with this value:

#file: /etc/fstab

<host-ip>:/<path-to-share>    /<path-to-mount>    nfs    rw,tcp,nolock,noacl,async    0 0
Enter fullscreen mode Exit fullscreen mode

Make sure you have created a directory for /.

Top comments (0)