{"id":61439,"date":"2025-04-29T11:39:22","date_gmt":"2025-04-29T03:39:22","guid":{"rendered":"https:\/\/fwq.ai\/blog\/61439\/"},"modified":"2025-04-29T11:39:22","modified_gmt":"2025-04-29T03:39:22","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8linux%e4%b8%8a%e9%85%8d%e7%bd%ae%e7%bd%91%e7%bb%9c%e5%85%b1%e4%ba%ab-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/61439\/","title":{"rendered":"\u5982\u4f55\u5728Linux\u4e0a\u914d\u7f6e\u7f51\u7edc\u5171\u4eab"},"content":{"rendered":"<p>\u5982\u4f55\u5728linux\u4e0a\u914d\u7f6e\u7f51\u7edc\u5171\u4eab<\/p>\n<p>\u7b80\u4ecb:<br \/>\u5728Linux\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u7f51\u7edc\u5171\u4eab\u5b9e\u73b0\u591a\u53f0\u8ba1\u7b97\u673a\u4e4b\u95f4\u7684\u6587\u4ef6\u548c\u8d44\u6e90\u5171\u4eab\u3002\u7f51\u7edc\u5171\u4eab\u53ef\u4ee5\u6781\u5927\u5730\u65b9\u4fbf\u6211\u4eec\u7684\u5de5\u4f5c\u548c\u751f\u6d3b\uff0c\u800c\u4e14\u8fd8\u53ef\u4ee5\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728linux\u4e0a\u914d\u7f6e\u7f51\u7edc\u5171\u4eab\uff0c\u5e76\u7ed9\u51fa\u76f8\u5e94\u7684\u4ee3\u7801\u793a\u4f8b\u3002<\/p>\n<p>\u6b65\u9aa4\u4e00: \u5b89\u88c5\u548c\u914d\u7f6eSamba\u670d\u52a1\u5668<\/p>\n<ol>\n<li>\u6253\u5f00\u7ec8\u7aef\uff0c\u4f7f\u7528root\u6743\u9650\u767b\u5f55\u3002<\/li>\n<li>\n<p>\u5b89\u88c5Samba\u670d\u52a1\u5668:<\/p>\n<pre>sudo apt-get update\nsudo apt-get install samba<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/li>\n<li>\n<p>\u914d\u7f6eSamba\u670d\u52a1\u5668:<\/p>\n<pre>sudo nano \/etc\/samba\/smb.conf<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6253\u5f00smb.conf\u6587\u4ef6\uff0c\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9:<\/p>\n<pre>[share]\ncomment = Shared Directory\npath = \/path\/to\/shared\/directory\nbrowseable = yes\nread only = no\nguest ok = yes<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5176\u4e2d\uff0c[share]\u662f\u5171\u4eab\u7684\u540d\u79f0\uff0ccomment\u662f\u5171\u4eab\u7684\u63cf\u8ff0\uff0cpath\u662f\u5171\u4eab\u7684\u76ee\u5f55\u8def\u5f84\u3002<\/p>\n<\/li>\n<li>\u4fdd\u5b58\u5e76\u5173\u95ed\u6587\u4ef6(\u6309Ctrl+X\uff0c\u518d\u6309Y\uff0c\u6700\u540e\u6309Enter\u952e)\u3002<\/li>\n<li>\n<p>\u91cd\u542fSamba\u670d\u52a1:<\/p>\n<pre>sudo systemctl restart smbd<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/li>\n<\/ol>\n<p>\u6b65\u9aa4\u4e8c: \u8bbe\u7f6eSamba\u5171\u4eab\u7684\u8bbf\u95ee\u6743\u9650<\/p>\n<ol>\n<li>\n<p>\u521b\u5efa\u5171\u4eab\u76ee\u5f55\u5e76\u8bbe\u7f6e\u6743\u9650:<\/p>\n<pre>sudo mkdir \/path\/to\/shared\/directory\nsudo chmod -R 777 \/path\/to\/shared\/directory<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u8fd9\u91cc\u4f7f\u7528\u4e86777\u6743\u9650\uff0c\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u9700\u6c42\u8bbe\u7f6e\u5176\u4ed6\u6743\u9650\u3002<\/p>\n<\/li>\n<li>\n<p>\u4e3a\u5171\u4eab\u76ee\u5f55\u521b\u5efaSamba\u7528\u6237:<\/p>\n<pre>sudo smbpasswd -a username<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5176\u4e2d\uff0cusername\u662f\u4f60\u4e3aSamba\u7528\u6237\u8bbe\u7f6e\u7684\u540d\u79f0\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u6b65\u9aa4\u4e09: \u8bbf\u95ee\u5171\u4eab\u6587\u4ef6\u5939<\/p>\n<ol>\n<li>\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u6253\u5f00\u8d44\u6e90\u7ba1\u7406\u5668\u3002<\/li>\n<li>\u5728\u5730\u5740\u680f\u8f93\u5165: linux_ip_addressshare\uff0c\u5176\u4e2dlinux_ip_address\u662fLinux\u8ba1\u7b97\u673a\u7684IP\u5730\u5740\uff0cshare\u662f\u5171\u4eab\u7684\u540d\u79f0\u3002<\/li>\n<li>\u8f93\u5165\u4e4b\u524d\u8bbe\u7f6e\u7684Samba\u7528\u6237\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002<\/li>\n<li>\u70b9\u51fb&#8221;\u786e\u5b9a&#8221;\uff0c\u5c31\u53ef\u4ee5\u8bbf\u95ee\u5171\u4eab\u6587\u4ef6\u5939\u4e86\u3002<\/li>\n<\/ol>\n<p>\u603b\u7ed3:<br \/>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u5728Linux\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u914d\u7f6e\u7f51\u7edc\u5171\u4eab\u662f\u76f8\u5bf9\u7b80\u5355\u7684\u3002\u5728\u914d\u7f6e\u8fc7\u7a0b\u4e2d\uff0c\u8bf7\u786e\u4fdd\u7f51\u7edc\u8fde\u63a5\u6b63\u5e38\uff0c\u9632\u706b\u5899\u5141\u8bb8Samba\u670d\u52a1\u5668\u7684\u7aef\u53e3\u901a\u8fc7\uff0c\u5e76\u4e14\u5171\u4eab\u76ee\u5f55\u7684\u6743\u9650\u8bbe\u7f6e\u6b63\u786e\u3002\u8fd9\u6837\uff0c\u4f60\u5c31\u53ef\u4ee5\u65b9\u4fbf\u5730\u5728\u591a\u53f0\u8ba1\u7b97\u673a\u4e4b\u95f4\u5171\u4eab\u6587\u4ef6\u548c\u8d44\u6e90\u4e86\u3002<\/p>\n<p>\u5e0c\u671b\u672c\u6587\u5bf9\u4f60\u914d\u7f6e\u7f51\u7edc\u5171\u4eab\u6709\u6240\u5e2e\u52a9\u3002\u5982\u679c\u4f60\u6709\u4efb\u4f55\u95ee\u9898\u6216\u7591\u95ee\uff0c\u6b22\u8fce\u7559\u8a00\u8ba8\u8bba\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5728Linux\u4e0a\u914d\u7f6e\u7f51\u7edc\u5171\u4eab\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8FDCServers\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5728linux\u4e0a\u914d\u7f6e\u7f51\u7edc\u5171\u4eab \u7b80\u4ecb:\u5728Linux\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u7f51\u7edc\u5171\u4eab\u5b9e\u73b0\u591a\u53f0\u8ba1\u7b97\u673a\u4e4b\u95f4\u7684\u6587\u4ef6\u548c\u8d44\u6e90\u5171\u4eab\u3002\u7f51\u7edc\u5171\u4eab\u53ef\u4ee5\u6781\u5927\u5730\u65b9\u4fbf\u6211\u4eec\u7684\u5de5\u4f5c\u548c\u751f\u6d3b\uff0c\u800c\u4e14\u8fd8\u53ef\u4ee5\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728linux\u4e0a\u914d\u7f6e\u7f51\u7edc\u5171\u4eab\uff0c\u5e76\u7ed9\u51fa\u76f8\u5e94\u7684\u4ee3\u7801\u793a\u4f8b\u3002 \u6b65\u9aa4\u4e00: \u5b89\u88c5\u548c\u914d\u7f6eSamba\u670d\u52a1\u5668 \u6253\u5f00\u7ec8\u7aef\uff0c\u4f7f\u7528root\u6743\u9650\u767b\u5f55\u3002 \u5b89\u88c5Samba\u670d\u52a1\u5668: sudo apt-get update sudo apt-get install samba \u767b\u5f55\u540e\u590d\u5236 \u914d\u7f6eSamba\u670d\u52a1\u5668: sudo nano \/etc\/samba\/smb.conf \u767b\u5f55\u540e\u590d\u5236 \u6253\u5f00smb.conf\u6587\u4ef6\uff0c\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9: [share] comment = Shared Directory path = \/path\/to\/shared\/directory browseable = yes read only = no guest ok = yes \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d\uff0c[share]\u662f\u5171\u4eab\u7684\u540d\u79f0\uff0ccomment\u662f\u5171\u4eab\u7684\u63cf\u8ff0\uff0cpath\u662f\u5171\u4eab\u7684\u76ee\u5f55\u8def\u5f84\u3002 \u4fdd\u5b58\u5e76\u5173\u95ed\u6587\u4ef6(\u6309Ctrl+X\uff0c\u518d\u6309Y\uff0c\u6700\u540e\u6309Enter\u952e)\u3002 \u91cd\u542fSamba\u670d\u52a1: sudo systemctl restart smbd \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa4\u4e8c: \u8bbe\u7f6eSamba\u5171\u4eab\u7684\u8bbf\u95ee\u6743\u9650 \u521b\u5efa\u5171\u4eab\u76ee\u5f55\u5e76\u8bbe\u7f6e\u6743\u9650: sudo mkdir \/path\/to\/shared\/directory sudo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-61439","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/61439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=61439"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/61439\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=61439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=61439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=61439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}