-
Open the Terminal application.
-
To list all the network services, type the following command:
networksetup -listallnetworkservices
- To turn off a network service, type the following command:
networksetup -setnetworkserviceenabled Wi-Fi off
- To turn on a network service, type the following command:
networksetup -setnetworkserviceenabled Wi-Fi on
- To automatically turn on a network service when the computer starts up, type the following command:
sudo networksetup -setairportpower en0 on
- To automatically turn off a network service when the computer starts up, type the following command:
sudo networksetup -setairportpower en0 off
- Open a terminal or command prompt on the Linux/Unix system.
- Identify the networking service to be configured, such as the NetworkManager or systemd- networkd service.
- Check the current status of the networking service using the command
systemctl status <service-name>
- If the service is not enabled to start at boot, enable it using the command
systemctl enable <service-name>
- If the service is currently running and should be stopped at boot, disable it using the command
systemctl disable <service-name>
- Restart the system to confirm that the service starts or stops automatically during boot.
- Verify that the service is running or stopped using the command
systemctl status <service-name>