The way to Reboot Networking on Mac from CLI


If you’ll want to reboot, or restart the networking interface in your Mac, by utilizing the CLI, then you possibly can concern the next instructions:

Utilizing the ifconfig main 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’ll want to 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

Leave a Reply