我已经安装了 ubuntu-server 16.04 和 VBoxLinuxadditions 和 Samba
我正在尝试将此服务器中的文件夹共享到我的 Windows 主机。现在我可以在我的网络上看到这个虚拟服务器,但服务器上没有共享文件夹。
如何通过命令行制作一个?
lew*_*s4u 18
所以我自己想出了这个,这是最简单的解决方案:
只需安装 samba
sudo apt install samba
Run Code Online (Sandbox Code Playgroud)
并转到此文件:
/etc/samba/smb.conf
Run Code Online (Sandbox Code Playgroud)
并在底部添加这些行:
[share]
comment = Ubuntu File Server Share
path = /path/to/the/folder #for example /home/user_name/public <- this comment needs to be deleted!
browsable = yes
guest ok = yes
read only = no
create mask = 0755
Run Code Online (Sandbox Code Playgroud)
重启samba服务
sudo service smbd restart
sudo service nmbd restart
Run Code Online (Sandbox Code Playgroud)
就是这样,很简单:)
| 归档时间: |
|
| 查看次数: |
57364 次 |
| 最近记录: |