Ubuntu and Mac OSX之间传输文件(共享文件夹方法)

解决思路来自于:https://devicetests.com/share-files-ubuntu-mac-osx

利用了samba协议,原文:

bash 复制代码
Samba is an open-source software suite that uses the SMB/CIFS protocol to provide seamless file and print services to SMB/CIFS clients. It is a popular choice for sharing files between Linux and Windows systems, but it works equally well for sharing files with Mac OSX.

首先,再ubuntu上进行设置

bash 复制代码
sudo apt-get install samba#安装samba
mkdir /home/username/foldername#创建共享文件夹
sudo gedit /etc/samba/smb.conf#修改配置文件

在smb.conf中,末尾添加

bash 复制代码
[shared]
 path = /home/username/shared
 read only = no
 browsable = yes

然后重启samba服务

bash 复制代码
sudo service smbd restart

然后,这里需要注册一个账户,方便后面mac访问共享文件夹使用

在终端中输入

bash 复制代码
sudo smbpasswd -a 用户名

按照提示输入密码就行了。

之后在mac上进行设置

在mac上,打开finder,点击左上角"Go",选择"连接到服务器",这里

bash 复制代码
smb://IPAddress/shared

在这里有个需要注意的地方

共享文件夹的名称可以随便起,但是连接到服务器的这里,最后一定是shared

这应该是跟配置文件中的那个[shared]标签有关系,在共享的过程中他访问的是这个标签下的路径,至于共享的那个文件夹叫什么已经不重要了。我一开始以为这里是文件夹名,结果一直登陆不进去。

登陆的时候选择注册账户,然后输入刚才注册的那个账户和密码,就可以访问了。

相关推荐
hello_fengfeng8 小时前
WSL2 安装到其他磁盘(D/E盘)完整指南
windows·ubuntu
q***76561 天前
ubuntu 安装 Redis
linux·redis·ubuntu
Tangcan-1 天前
在Ubuntu 22.04上安装redis
linux·redis·ubuntu
袁袁袁袁满1 天前
Ubuntu怎么查看系统日志?
linux·运维·服务器·ubuntu
yuyuyuliang001 天前
Ubuntu 22.04安装PostgreSQL教程
linux·运维·ubuntu·postgresql
njtong1 天前
Ubuntu系统apache2网站的Let‘s Encrypt证书问题
linux·运维·ubuntu
HIT_Weston2 天前
132、【Ubuntu】【Hugo】搜索功能异常(问题解决)(二)
linux·运维·ubuntu
xj198603192 天前
Java进阶-在Ubuntu上部署SpringBoot应用
java·spring boot·ubuntu
若谷老师2 天前
21.WSL中部署gnina分子对接程序ds
linux·人工智能·ubuntu·卷积神经网络·gnina·smina
Norach2 天前
ubuntu22.04安装ssh-server与realvnc-server
linux·服务器·经验分享·ubuntu·ssh·vnc