How you can Reboot Networking on Mac from CLI

0
6
Adv1


Adv2

If you should reboot, or restart the networking interface in your Mac, through the use of the CLI, then you may problem the next instructions:

Utilizing the ifconfig major interface

Tear down the networking interface

sudo ifconfig en0 down

Restart the networking interface

sudo ifconfig en0 up

Confirm the networking restart

ifconfig -u en0

Various with out sudo, utilizing networksetup

If you should carry out the identical outcome, however not capable of run sudo, then look to the networksetup.

Tear down the networking interface

networksetup -setairportpower en0 off
# or
networksetup -setairportpower "Wi-Fi" off

Restart the networking interface

networksetup -setairportpower en0 on
# or
networksetup -setairportpower "Wi-Fi" on

For extra info

For extra info on the above instructions, check out the person pages.

man ifconfig
man networksetup
Adv3