【命令】命令行 启动 关闭 网卡

前言

MacOS命令行下,启动或关闭网卡

基本命令

查看网卡编号

1
ifconfig

开启网卡

<num>:网卡编号

1
sudo ifconfig <num> up

关闭网卡

1
sudo ifconfig <num> down

完成