Step One: Install NFS Services
sudo apt-get install nfs-kernel-server portmap
Step Two: Add NFS configuration Files
sudo vim /etc/exports
Add the following information to the VIM terminal:
/home/china/nfsroot *(rw,sync,no_root_squash)
The path above explains, for example, the shared folder where the Nfsroot folder is used for NFS services
Step Three: Restart the NFS service
sudo /etc/init.d/nfs-kernel-server restart
Each time you modify the configuration information for NFS, you need to execute a command to restart the NFS service
Done!!!
Verification one: Linux itself mounts itself
First, use the following command to view the Mount folder path information
showmount -e
Then execute the following command to mount the changed folder:
sudo mount -t nfs 192.168.1.218:/home/china/nfsroot /mnt/nfs/
Among them, the above IP address for my Ubuntu IP address, you can ipconfig
view their own through the command, /mnt/nfs/
the NFS folder is my own in the Ubuntu system root/mnt/under the self-established.
Execute the following command to see if the mount succeeds
ls /mnt/nfs/
You can see /home/china/nfsroot/
that the information in the target folder is already attached to the /mnt/nfs/
folder.
Execute the following command to complete the uninstallation of the shared folder
sudo umount /mnt/nfs
Verification Two: The ARM board mounts the folders in the Linux system
Enter the ARM development Board (the author is Jz2440v3)
Execute the following command in the terminal of the Development Board
mount -t nfs -o nolock 192.168.1.218:/home/china/nfsroot /mnt/nfs/
The /mnt/nfs/
NFS folder in this is the one I built on the Development Board.
Execute commands in the terminal of the Development Board
ls /mnt/nfs/
Normal mount
The Unload Mounted Folder command is
umount /mnt/nfs/
Verify that the uninstallation was successful.
P.S.
Each time you modify the configuration information for NFS, you need to execute a command to restart the NFS servicesudo /etc/init.d/nfs-kernel-server restart
If you encounter an error during execution, copy the problem to Baidu or Google, it may be solved
UBUNTU16.04NFS Configuration and ARM Development Board transfer Files _ mount and unload