在嵌入式中开发,由于交叉编译,很多人都系统叫代码在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地址。

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐