<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>文件共享 &#8211; mylogs.cn</title>
	<atom:link href="https://mylogs.cn/tag/%e6%96%87%e4%bb%b6%e5%85%b1%e4%ba%ab/feed/" rel="self" type="application/rss+xml" />
	<link>https://mylogs.cn</link>
	<description>发现、记录、分享</description>
	<lastBuildDate>Tue, 11 Aug 2026 12:36:53 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>GNOME 文件夹一键共享到局域网，手机也能读</title>
		<link>https://mylogs.cn/gnome-%e6%96%87%e4%bb%b6%e5%a4%b9%e4%b8%80%e9%94%ae%e5%85%b1%e4%ba%ab%e5%88%b0%e5%b1%80%e5%9f%9f%e7%bd%91%ef%bc%8c%e6%89%8b%e6%9c%ba%e4%b9%9f%e8%83%bd%e8%af%bb/</link>
		
		<dc:creator><![CDATA[steve, zhang]]></dc:creator>
		<pubDate>Tue, 11 Aug 2026 12:36:53 +0000</pubDate>
				<category><![CDATA[经验与技巧]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[局域网]]></category>
		<category><![CDATA[文件共享]]></category>
		<category><![CDATA[网络技巧]]></category>
		<guid isPermaLink="false">https://mylogs.cn/gnome-%e6%96%87%e4%bb%b6%e5%a4%b9%e4%b8%80%e9%94%ae%e5%85%b1%e4%ba%ab%e5%88%b0%e5%b1%80%e5%9f%9f%e7%bd%91%ef%bc%8c%e6%89%8b%e6%9c%ba%e4%b9%9f%e8%83%bd%e8%af%bb/</guid>

					<description><![CDATA[家里几台设备传文件，插 U 盘、发聊天软件都嫌麻烦。Linux 上最省事的办法是用 Samba 把任意文件夹共 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">家里几台设备传文件，插 U 盘、发聊天软件都嫌麻烦。Linux 上最省事的办法是用 Samba 把任意文件夹共享到局域网，Windows、macOS、安卓手机都能像打开普通磁盘一样访问。GNOME 文件管理器装一个轻量扩展，就能右键一键把文件夹共享出去，普通用户账户也能操作。相比系统自带的&#8221;个人文件共享&#8221;（只能共享 ~/Public 一个文件夹、且走 WebDAV 协议），Samba 基于成熟的 SMB 协议，跨平台兼容性更好，适合长期共享。</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6a7b45cf83350&quot;}" data-wp-interactive="core/image" data-wp-key="6a7b45cf83350" class="wp-block-image size-large aligncenter wp-lightbox-container"><img fetchpriority="high" decoding="async" width="1200" height="750" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://mylogs.cn/wp-content/uploads/2026/08/d0590fadfe6e84c0dc70b07e76974c12_header.webp" alt="GNOME 文件夹一键共享到局域网，手机也能读" class="wp-image-4456" style="max-width:100%;height:auto;" srcset="https://mylogs.cn/wp-content/uploads/2026/08/d0590fadfe6e84c0dc70b07e76974c12_header.webp 1200w, https://mylogs.cn/wp-content/uploads/2026/08/d0590fadfe6e84c0dc70b07e76974c12_header-300x188.webp 300w, https://mylogs.cn/wp-content/uploads/2026/08/d0590fadfe6e84c0dc70b07e76974c12_header-1024x640.webp 1024w, https://mylogs.cn/wp-content/uploads/2026/08/d0590fadfe6e84c0dc70b07e76974c12_header-768x480.webp 768w" sizes="(max-width: 1200px) 100vw, 1200px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">图片来源：How-To Geek</figcaption></figure>





<h2 class="wp-block-heading">一、装好 Samba 和扩展（Ubuntu / Mint / Debian）</h2>



<ol class="wp-block-list"><li>打开终端，安装 Samba 本体：<code>sudo apt install samba -y</code></li><li>安装 GNOME Files 的共享扩展：<code>sudo apt install nautilus-share -y</code></li><li>让文件管理器识别新扩展，重启一下它：<code>nautilus -q</code>（随后重新打开&#8221;文件&#8221;即可）。Fedora、Arch、openSUSE 等发行版请改用各自的包管理器。</li></ol>



<h2 class="wp-block-heading">二、开启 usershare，让普通用户也能共享</h2>



<ol class="wp-block-list"><li>用编辑器打开 Samba 全局配置：<code>sudo vi /etc/samba/smb.conf</code>（也可换成你习惯的编辑器）。</li><li>在 <code>[global]</code> 段确认有以下两行：<code>usershare path = /var/lib/samba/usershares</code> 和 <code>usershare max shares = 100</code>。</li><li>把当前用户加入 sambashare 组：<code>sudo usermod -aG sambashare $USER</code>。</li><li>重载配置：<code>smbcontrol smbd reload-config</code>；若没生效，再试 <code>sudo systemctl restart smbd</code>；仍不行就注销或重启一次。加入新用户组后，建议注销重新登录，让组权限彻底生效。</li></ol>



<h2 class="wp-block-heading">三、右键文件夹开始共享</h2>



<ol class="wp-block-list"><li>在&#8221;文件&#8221;里选中任意文件夹，右键 → &#8220;Sharing Options&#8221;（共享选项）。</li><li>在弹出的 &#8220;Folder Sharing&#8221; 对话框里勾选 &#8220;Share this folder&#8221;。</li><li>按需勾选&#8221;允许写入&#8221;和&#8221;允许访客&#8221;；默认两者都关闭，更稳妥。</li></ol>



<h2 class="wp-block-heading">四、其他设备怎么连</h2>



<ol class="wp-block-list"><li>macOS：访达 → 前往 → 连接服务器，输入 <code>smb://</code> 加上电脑 IP，例如 <code>smb://192.168.1.99</code>。</li><li>Windows：打开文件资源管理器，在地址栏直接输入 <code>\\</code> 加 IP（如 <code>\\192.168.1.99</code>），或输入计算机名即可浏览共享文件夹。</li><li>安卓：系统自带管理器大多不支持 SMB，可装 CX 文件浏览器或 Material Files，切到 NETWORK → 新建位置 → Remote → SMB，填入主机 IP 即可。</li><li>只要支持 SMB 协议的设备（NAS、树莓派、智能电视等）基本都能连。</li></ol>



<p class="wp-block-paragraph">注意事项：Samba 走 SMB 协议，跨平台兼容性很好，但共享含敏感文件的文件夹时建议保留默认的&#8221;禁止访客访问&#8221;，并只在可信的局域网内开启。若其他设备连不上，先确认两台机器在同一网段，并检查系统防火墙是否放行了文件和打印机共享。</p>



<p class="wp-block-paragraph">来源：How-To Geek</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
