在嵌入式中开发,由于交叉编译,很多人都系统叫代码在windows上面写,在上传到linux服务器编译。这种大多数都是用FTP服务来完成的。
这里给大家介绍一种samba工具,可以叫linux上面的文件夹共享到windows通过IP地址访问即可。
1.第一步在linux上面安装samba
安装命令:sudo apt install
- sudo apt install samba samba-common
复制代码
2.修改你需要共享文件的权限
- /**./works this is share file path**/
- sudo chmod 777 ./works/
复制代码
3.修改samba配置文件
- /***open config file****/
- sudo vim /etc/samba/smb.conf
复制代码- /**for config file,add the following code at the end of the file***/
- [works]
- comment = works
- path = /home/gzxs/works
- browseable = yes
- writeable = yes
- available = yes
- public = yes
复制代码
4.重启samba服务
- sudo service smbd restart
复制代码
5.windows打开共享文件夹
PS:ip地址为你当前linux的ip地址。
|