ubuntu下共享文件到windows

本文详细介绍如何在Ubuntu 16.04与Windows 7 64位系统间通过Samba实现文件共享。首先,需在Ubuntu上安装Samba服务,并为用户设置密码。然后创建共享目录,编辑smb.conf配置文件,最后重启smbd服务即可完成共享设置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

version: ubuntu:16.04, windows 7 64bit

软件安装

Install Samba

sudo apt-get update
sudo apt-get install samba

Set a password for your user in Samba

sudo smbpasswd -a <user_name>
eg. 
a@a-pc:~$ sudo smbpasswd -a myname
New SMB password:
Retype new SMB password:

直接点要共享的文件,使能共享就行,后面的内容可选。

Create a directory to be shared

mkdir /home/<user_name>/<folder_name>
sudo cp /etc/samba/smb.conf ~  //bak the cfg file
sudo nano /etc/samba/smb.conf
Once "smb.conf" has loaded, add this to the very end of the file:

[<folder_name>]
path = /home/<user_name>/<folder_name>
valid users = <user_name>
read only = no

restart smbd

sudo service smbd restart

ref url

https://help.ubuntu.com/community/How to Create a Network Share Via Samba Via CLI (Command-line interface/Linux Terminal) - Uncomplicated%2C Simple and Brief Way!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值