如果您在将Mac连接到互联网时遇到困难或上传和下载速度持续缓慢,解决该问题的一种方法是将 macOS 网络设置重置为出厂默认设置。您可以依靠三种方法来实现这一目标。
第一种方法是最直接的,涉及 macOS终端(Terminal)。相比之下,第二种和第三种方法稍微复杂一些,需要与系统设置(System Settings)和Finder应用程序进行交互。
从本教程中基于终端的网络重置过程开始。如果您要排除的网络问题在MacBook、i Mac或Mac mini
上仍然存在,请转向其他技术。(Move)

方法一:通过终端(Terminal)重置网络设置(Reset Network Settings)
解决Mac(Mac)上因网络设置故障引起的意外问题的最快方法是关闭并重新启动有问题的网络接口。macOS 终端(macOS Terminal)可以帮助您。
macOS 为其网络接口(Wi-Fi、以太网(Ethernet)等)分配不同的物理或逻辑标识符。因此,您应该首先弄清楚要重置的接口的硬件端口。
- 打开启动板(Launchpad)并选择其他 >终端(Terminal)。

- 运行以下命令:
网络设置-列表网络服务顺序

- 记(Note)下要重置的接口的硬件端口标识符 - em0、en1 等。例如,在下面的屏幕截图中,标准Wi-Fi连接使用 en1 作为其标识符。

- 运行以下命令,将 en0 替换为正确的硬件端口标识符:
sudo ifconfig en0 下来

macOS 要求您输入Mac管理员密码才能执行该命令 - 只需键入该密码并按Return即可。执行该命令后,网络接口应关闭。
- 运行以下命令,再次将 en0 替换为适当的硬件端口:
sudo ifconfig en0 向上
运行命令后,网络接口应立即重新激活。
方法 2:删除(Remove)并重新添加网络接口(Re-Add Network Interface)
如果终端(Terminal)方法无法解决问题,您必须删除并重新添加 Mac 上有问题的网络接口(Mac)。
如果您使用运行 macOS Ventura或更高版本的(Ventura)Mac,则必须:
- 打开Apple菜单并选择“系统设置”(System Settings)。

- 选择(Select Network)侧边栏上的网络。然后,按住 Control 键单击(Control-click)要删除的接口(Wi-Fi、以太网(Ethernet)等),然后选择“删除服务”(Delete Service)。

- 选择删除(Select Delete)以确认您的操作。

- 选择屏幕右下角的“更多”图标(三个点),然后选择“添加服务”(Add Service)。

- 打开“接口”(Interface)旁边的菜单,然后选择要重新添加的接口,例如Wi-Fi或以太网(Ethernet)。

- 选择创建按钮。

重新添加接口后,
您的Mac应该会自动重新连接到可用网络。(Mac)
如果您的Mac运行 macOS Monterey或更早版本,则删除和重新添加网络接口的步骤会略有不同,因为旧版系统偏好设置(System Preferences)应用程序上的用户界面发生了变化。
- 打开Apple菜单并选择“系统偏好设置”(System Preferences)。
- 选择网络类别。
- 突出显示(Highlight)要删除的网络接口。
- 选择减号(Minus)图标(屏幕左下角),然后选择应用(Apply)。
- 选择加号图标。
- 选择您要重新添加的接口,例如Wi-Fi或以太网(Ethernet)。
- 选择创建。
通过 Finder 重置网络设置
以下方法涉及通过Finder(Finder)删除 Mac 的网络配置文件,有效地将所有网络接口和VPN配置重置为出厂默认设置。
重要提示:我们建议您在开始之前创建 Time Machine 备份(creating a Time Machine backup before you begin)。这使您可以选择在出现问题时回滚任何更改。
- 打开Finder,然后选择菜单栏上的
Go > Go

- 复制并粘贴以下文件夹路径,然后按 Return 键:
/库/首选项/系统配置/

- 按住 Control 键单击(Control-click)以下文件并选择(Trash)移至(Move)废纸篓:
- com.apple.airport.preferences.plist
- com.apple.network.identification.plist
- com.apple.network.eapolclient.configuration.plist
- com.apple.wifi.message-tracer.plist
- 网络接口.plist
- 首选项.plist

注意:根据您的 macOS 版本,SystemConfiguration文件夹可能不包含上述每个文件。只需(Just)删除存在的文件即可。
- 输入您的Mac用户帐户密码,然后选择“确定”以授权操作。

- 打开Apple菜单并选择“重新启动”(Restart)。

- 取消选中重新登录时重新打开窗口旁边的框,然后再次选择重新(Reopen)启动进行(Restart)确认。

Mac重新启动后,它应该会自动重新创建您删除的文件。但是,与之前的方法不同的是,您之后必须手动重新连接到任何网络。
例如,如果您想重新加入Wi-Fi网络,请选择菜单栏上的Wi-Fi图标,选择(Wi-Fi)Wi-Fi名称或SSID,然后输入其Wi-Fi密码。
您还可以尝试什么?
除了Mac网络设置重置之外,还有各种标准故障排除程序可以帮助解决与网络相关的问题。(Mac)如果您还没有这样做,我们还建议您执行以下修复:
重新启动路由器
您是否知道,只需重新启动 Wi-Fi 或以太网路由器就可以解决(Did)Mac上的大量互联网连接问题?只需(Just)将其关闭,等待至少一分钟,然后重新打开即可。
如果您依靠移动热点将Mac连接到互联网,那么重新启动 iOS(restarting your iOS)或Android 设备(Android device)也会有所帮助。
清除 DNS 缓存
Mac上损坏的DNS(域名系统)缓存(DNS (Domain Name System) cache)可能会因无法解析 IP 地址而导致网络问题。通过 macOS终端(Terminal)运行以下命令将其清除:
sudo Killall -HUP mDNSResponder
清除浏览器缓存
如果仅在浏览器上出现网络问题,则网络缓存可能已过时。如果您使用Safari,请按以下步骤清除浏览器缓存:
- 打开Safari并在菜单栏上
选择Safari >清除历史记录。(Clear History)
- 打开“清除”(Clear)旁边的下拉菜单,然后选择“所有历史记录”(History)。
- 选择清除历史记录进行确认。
您使用的是(Are)不同的网络浏览器吗?了解(Learn)如何清除 Mac 上的任何浏览器缓存(clear any browser cache on Mac)。
重置您的路由器
这是一种高级修复方法,但硬重置路由器通常是解决路由器端网络问题的最佳方法。
有关全面的分步说明,请参阅我们的网络路由器恢复出厂设置指南(guide on factory-resetting a network router)。
网络重置您的手机
如果问题发生在移动热点上,请考虑将手机的网络设置重置为默认值。例如,在 iPhone 或 iPad 上,您必须:
- 打开“设置”(Settings)应用程序并选择“常规”(General)。
- 转至传输或重置(Reset)iPhone/iPad >重置(Reset)。
- 选择重置网络设置。
Mac 网络设置重置成功(Mac Network Settings Reset Successful)
重置网络设置并不是解决Mac(Mac)计算机上出现的所有连接问题的灵丹妙药。尽管如此,它确实涵盖了故障排除尝试中的很多内容。请(Make)务必研究问题的性质,并采取任何其他修复措施来解决问题。您还可以联系 Apple 支持(contact Apple Support)或您的互联网服务提供商以获得额外帮助。
How to Reset Network Settings in macOS
If you haνe difficulty connecting your Mac to the internet or keep experiеncing slow upload and download speeds, one way to troubleshoot the problem is to reset the macOS network settings to factory defaults. There are threе approaches you can rely on to accomplish that.
The first method is the most straightforward and involves the macOS Terminal. In contrast, the second and third methods are slightly complicated and require interactions with the System Settings and Finder apps.
Begin with the Terminal-based network reset procedure in this tutorial. Move onto the other techniques if the network issue you’re troubleshooting persists on your MacBook, iMac, or Mac mini.

Method 1: Reset Network Settings via Terminal
The quickest way to resolve unexpected problems caused by glitchy network settings on a Mac is to shut down and restart the problematic network interface. The macOS Terminal can help you with that.
macOS assigns different physical or logical identifiers to its network interfaces (Wi-Fi, Ethernet, etc.). So, you should first figure out the hardware port of the interface you want to reset.
- Open the Launchpad and select Other > Terminal.

- Run the following command:
networksetup -listnetworkserviceorder

- Note down the hardware port identifier of the interface you want to reset—em0, en1, etc. For example, in the screenshot below, standard Wi-Fi connections use en1 as their identifier.

- Run the following command, replacing en0 with the correct hardware port identifier:
sudo ifconfig en0 down

macOS requires you to enter your Mac administrator password to execute the command—just type it out and press Return. The network interface should shut down after you execute the command.
- Run the following command, again replacing en0 with the appropriate hardware port:
sudo ifconfig en0 up
The network interface should reactivate immediately after you run the command.
Method 2: Remove and Re-Add Network Interface
If the Terminal method fails to fix the issue, you must delete and re-add the problematic network interface on your Mac.
If you use a Mac running macOS Ventura or later, you must:
- Open the Apple menu and select System Settings.

- Select Network on the sidebar. Then, Control-click the interface you want to remove—Wi-Fi, Ethernet, etc.—and select Delete Service.

- Select Delete to confirm your action.

- Select the More icon (three dots) on the lower-right corner of the screen and choose Add Service.

- Open the menu next to Interface and pick the interface you want to re-add, such as Wi-Fi or Ethernet.

- Select the Create button.

Your Mac should automatically reconnect to available networks once you finish re-adding the interface.
If your Mac runs macOS Monterey or earlier, the steps to delete and re-add a network interface are slightly different due to the user interface changes on the older System Preferences app.
- Open the Apple menu and select System Preferences.
- Select the Network category.
- Highlight the network interface you want to remove.
- Select the Minus icon (lower-left corner of the screen), and then Apply.
- Select the Plus icon.
- Pick the interface you want to re-add—e,g., Wi-Fi or Ethernet.
- Select Create.
Reset Network Settings via Finder
The following method involves deleting your Mac’s network configuration files through Finder, effectively resetting all network interfaces and VPN configurations to factory defaults.
Important: We recommend creating a Time Machine backup before you begin. That gives you the option to roll back any changes in case something goes wrong.
- Open Finder and select Go > Go to Folder on the menu bar.

- Copy and paste the following folder path and press Return:
/Library/Preferences/SystemConfiguration/

- Control-click the following files and select Move to Trash:
- com.apple.airport.preferences.plist
- com.apple.network.identification.plist
- com.apple.network.eapolclient.configuration.plist
- com.apple.wifi.message-tracer.plist
- NetworkInterfaces.plist
- preferences.plist

Note: Depending on your macOS version, the SystemConfiguration folder may not contain every file above. Just delete the files that are present.
- Enter your Mac user account password and select OK to authorize the action.

- Open the Apple menu and select Restart.

- Uncheck the box next to Reopen windows when logging back in and select Restart again to confirm.

After your Mac reboots, it should automatically recreate the files you deleted. Unlike the previous methods, however, you must manually reconnect to any network afterward.
For example, if you want to rejoin a Wi-Fi network, select the Wi-Fi icon on the menu bar, pick the Wi-Fi name or SSID, and enter its Wi-Fi password.
What Else Can You Try?
A Mac network settings reset aside, there are various standard troubleshooting procedures that can help resolve network-related issues. If you haven’t already, we also recommend that you follow up with the fixes below:
Restart Your Router
Did you know that simply restarting your Wi-Fi or Ethernet router can fix loads of internet connectivity issues on your Mac? Just switch it off, wait for at least one minute, and turn it back on.
If you rely on a mobile hotspot to connect your Mac to the internet, then restarting your iOS or Android device would also help.
Clear the DNS Cache
A corrupt DNS (Domain Name System) cache on the Mac can cause network issues by failing to resolve IP addresses. Run the following command through the macOS Terminal to flush it out:
sudo killall -HUP mDNSResponder
Clear the Browser Cache
If network issues occur over a browser only, the web cache is likely obsolete. If you use Safari, here’s how to clear the browser cache:
- Open Safari and select Safari > Clear History on the menu bar.
- Open the pull-down menu next to Clear and select All History.
- Select Clear History to confirm.
Are you using a different web browser? Learn how to clear any browser cache on Mac.
Reset Your Router
This is an advanced fix, but hard-resetting the router is often the best way to address network issues that stem from the router-side.
For comprehensive step-by-step instructions, refer to our guide on factory-resetting a network router.
Network-Reset Your Phone
If the problem occurs over a mobile hotspot, consider resetting the phone’s network settings to its defaults. For example, on an iPhone or iPad, you must:
- Open the Settings app and select General.
- Go to Transfer or Reset iPhone/iPad > Reset.
- Select Reset Network Settings.
Mac Network Settings Reset Successful
A network settings reset isn’t the silver bullet to all connectivity issues that occur on a Mac computer. Still, it does cover a lot of ground in your troubleshooting attempts. Make sure to research the nature of the problem and work on any additional fixes to resolve the issue. You can also contact Apple Support or your internet service provider for extra help.