linux 服务sambal nfs

-r 递归的

sambal 服务

sudo apt-get install samba

sudo vi /etc/samba/smb.conf  : 修改samba配置文件

[share]
    path = /home/hyg/share
    available = yes
    browsealbe = yes
    public = yes
    writable = yes

sudo /etc/init.d/samba restart  : 重启服务

nfs 服务:

sudo apt-get install nfs-kernel-server

sudo vi /etc/export

/home/hyg/share *(rw,sync,no_root_squash) : 写入文件

sudo /etc/init.d/nfs-kernel-server restart :重启服务

测试:

sudo mount -t nfs localhost:/home/hyq/share/mnt

原文地址:https://www.cnblogs.com/cjj-zyj/p/9915126.html