Linux在windows上共享目录

这篇博客详细介绍了如何在Linux系统中配置共享目录,以便通过Windows进行访问。步骤包括编辑`smb.conf`文件,设定共享路径和权限,重启smbd服务,以及在Windows的CMD中输入特定命令来访问共享目录。

四、配置共享目录

sudo vi /etc/samba/smb.conf

在文件尾追加以下内容

[share]

path = /data/home/t_route/

available = yes

valid users = root

read only = no

browsable = yes

public = yes

writable = yes

share:外部访问的目录名

path:linux上需要共享的目录

valid users:添加的账户名

五、重启smbd服务

service smb restart

六、访问共享目录

cmd 输入 //linuxip/共享目录名

//192.168.0.140/share

/etc/samba/smb.conf 配置文件如下:

See smb.conf.example for a more detailed config file or

read the smb.conf manpage.

Run ‘testparm’ to verify the config is correct after

you modified it.

[global]

workgroup = SAMBA

security = user

passdb backend = tdbsam

printing = cups

printcap name = cups

load printers = yes

cups options = raw

[homes]

comment = Home Directories

valid users = %S, %D%w%S

browseable = No

read only = No

inherit acls = Yes

[printers]

comment = All Printers

path = /var/tmp

printable = Yes

create mask = 0600

browseable 《一线大厂Java面试题解析+后端开发学习笔记+最新架构讲解视频+实战项目源码讲义》无偿开源 威信搜索公众号【编程进阶路】 = No

[print$]

comment = Printer Drivers

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值