NFS Configs

NFS installation

install nfs server kernal

sudo apt update
sudo apt install nfs-kernal-server -y 

make a directory

# in my desktop
mkdir ~/Desktop/nfs-share
#change permission
sudo chown nobody:nogroup ~/Desktop/nfs-share 

#add world writable permission
sudo chmod 777 ~/Desktop/nfs-share

### enable share

edit /etc/exports

```bash
#added this line
# this is for network CIDR
/home/anir0y/Desktop/nfs {IP}/{subnet}(rw,sync,no_subtree_check)
# example:
/home/anir0y/Desktop/nfs 192.168.29.0/24(rw,sync,no_subtree_check)

restart NFS

# enable shares
sudo exportfs
# restart the service
sudo systemctl restart nfs-kernel-server.service

add NFS share as client

install nfs client

sudo apt update
sudo apt install nfs-common -y

mount share

# make a mounting dir
mkdir ~/nfsclient
sudo mount -t nfs {IP}:{folder} {local_path}
#e.g.
sudo mount -t nfs 192.168.29.83:/home/anir0y/Desktop/nfs ~/nfsclient

Last updated