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]标签有关系,在共享的过程中他访问的是这个标签下的路径,至于共享的那个文件夹叫什么已经不重要了。我一开始以为这里是文件夹名,结果一直登陆不进去。

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

相关推荐
xiaobin889995 小时前
【2025最新版】VMware虚拟机下载安装教程 保姆级图文详解(附安装包+常用镜像Linux,win11,ubuntu,centos)
linux·其他·ubuntu·centos
ALex_zry5 小时前
Ubuntu 20.04 C++开发环境搭建指南(2025版)
linux·c++·ubuntu
Eric.Lee202119 小时前
Ubuntu shell指定conda的python环境启动脚本
python·ubuntu·conda·shell
dubochao_xinxi1 天前
✅ TensorRT Python 安装精简流程(适用于 Ubuntu 20.04+)
开发语言·python·ubuntu
yangshuo12811 天前
风车OVF镜像:解放AI开发限制的Ubuntu精简系统
linux·人工智能·ubuntu
flypig哗啦啦1 天前
ubuntu服务器版启动卡在start job is running for wait for...to be Configured
linux·运维·ubuntu
子非衣1 天前
Ubuntu系统挂载磁盘并配置开机自动挂载
linux·运维·ubuntu
ChironW1 天前
Ubuntu 22.04.5 LTS上部署Docker及相关优化
ubuntu·docker·容器
richer_20201 天前
双系统重装ubuntu
linux·运维·ubuntu
微学AI1 天前
用FileCodeBox打造私有文件传输:Ubuntu环境保姆级部署教程!
linux·运维·ubuntu