- 后面的3个IP地址分别是网卡IP地址,子网掩码,网关IP地址
networksetup -setmanual "USB 10/100/1000 LAN" 192.168.1.100 255.255.255.0 192.168.1.1
- 配置网卡DNS服务器
networksetup -setdnsservers "USB 10/100/1000 LAN" 192.168.1.1
- 清除网卡DNS服务器
networksetup -setdnsservers "USB 10/100/1000 LAN" empty