怎么关闭系统网络共享?

怎么关闭系统网络共享?

思想开拓者 2025-06-18 12:53:44 看科技 14 次浏览 0个评论

在当今数字化时代,网络共享已成为我们日常生活和工作中不可或缺的一部分,无论是家庭局域网还是企业级网络环境,网络共享都极大地便利了文件传输、资源共享等操作,在某些情况下,出于安全考虑或隐私保护的需求,我们需要关闭系统网络共享功能,本文将详细介绍如何在不同操作系统上关闭网络共享,以帮助用户根据实际需求进行操作。

怎么关闭系统网络共享?

Windows系统关闭网络共享

通过控制面板关闭

  • 打开控制面板:点击“开始”菜单,选择“控制面板”。
  • 进入网络和共享中心:在控制面板中,找到并点击“网络和共享中心”。
  • 更改高级共享设置:在网络和共享中心页面,点击左侧的“更改高级共享设置”。
  • 关闭网络共享:在弹出的窗口中,分别针对“公用网络”和“家庭或工作网络”设置,将相关选项(如“网络发现”、“文件和打印机共享”)设置为“关闭”。
  • 保存并退出:完成设置后,点击“保存更改”,系统会提示重启计算机以应用更改。

通过组策略编辑器关闭(适用于专业版及企业版)

  • 运行组策略编辑器:按Win+R键,输入gpedit.msc并回车,打开组策略编辑器。
  • 导航到相关设置:依次展开“计算机配置” -> “管理模板” -> “网络” -> “Lanman工作站”。
  • 禁用文件和打印机共享:在右侧窗格中找到“启用文件和打印机共享”,双击它,选择“已禁用”。
  • 应用并重启:同样地,对于其他相关设置(如“启用网络发现”)也进行类似操作,然后重启计算机使更改生效。

macOS系统关闭网络共享

通过系统偏好设置

  • 打开系统偏好设置:点击屏幕左上角的苹果图标,选择“系统偏好设置”。
  • 进入共享选项:在系统偏好设置窗口中,点击“共享”。
  • 取消勾选相关服务:在共享界面,取消勾选“文件共享”、“打印队列”以及任何其他不需要的服务。
  • 应用更改:点击“好”按钮保存设置。

通过终端命令(高级用户)

  • 打开终端:使用Spotlight搜索“终端”并打开它。
  • 执行命令:输入以下命令之一来关闭特定类型的共享:
    • sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/AirPortUtilitystop
    • sudo discoveryutil disablenetworking;
    • sudo discoveryutil stopdiscoveryd;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dns.plist;
    • `sudo launchctl unload -w /System/Library/LaunchDaemons/com.

转载请注明来自流年轻浅百科,本文标题:《怎么关闭系统网络共享?》

每一天,每一秒,你所做的决定都会改变你的人生!

发表评论

快捷回复:

评论列表 (暂无评论,14人围观)参与讨论

还没有评论,来说两句吧...