To enable or disable a Network Interface Card (NIC), which essentially refers to your network interfaces like Wi-Fi, Ethernet, etc., on a macOS system, you’d typically be interacting with the network service corresponding to that interface. Here’s how you can do this using both the GUI and the command line:
1. Using System Preferences (GUI):
- Click on the Apple icon in the top-left corner and choose
- Go to
- On the left sidebar, select the network service (e.g., Wi-Fi or Ethernet) you want to disable.
- Click on the
Turn offbutton or
Disconnectbutton at the bottom left of the window.
- Optionally, if you want to remove this service permanently (not just disable), click on the minus (
-) button at the bottom of the service list.
- Follow steps 1-3 from above.
- Click on the
Turn onbutton or
Connectbutton at the bottom left of the window.
2. Using Terminal (Command Line):
sudo networksetup -setnetworkserviceenabled <service-name> off
<service-name> with the name of the network service you wish to disable, like
sudo networksetup -setnetworkserviceenabled <service-name> on
<service-name> with the name of the network service you wish to enable.
Tip: To see a list of all network services, you can use the command:
Remember, disabling a NIC or network service will disconnect you from the network. If you’re remotely accessing a machine or relying on a network connection for some task, use caution to ensure you don’t interrupt essential services or tasks.