1、在虚拟机中:安装samba服务
在终端中输入sudo apt-get install samba
输入用户密码
2、备份samba服务的配置文件/etc/samba/smb.conf
我这里的备份文件是bak_smb.conf
3、sudo修改smb.conf,在最后添加脚本配置
# set the samba server
# make the comunication between VM_linux and Windows
[zhou]
comment = share
path = /home/zhou/
writable = yes
browseable = yes
available = yes
public = yes
security = share
force user = zhou
path = 在虚拟机中共享文件夹的绝对路径
4、重启samba有关服务
#命令行输入
sudo /etc/init.d/smbd restart
sudo /etc/init.d/nmbd restart
5、windows映射网络驱动器

本文详细介绍了如何在虚拟机中安装并配置Samba服务,实现与Windows系统的文件共享。步骤包括:安装Samba服务、备份配置文件、编辑smb.conf添加共享设置、重启Samba服务及在Windows端映射网络驱动器。
5355





