通过命令行进行网卡的开关
Linux端
查看网卡
ifconfig
开启网卡
ifconfig [NIC_NAME] Up
例如:
ifconfig enp0s3 up
关闭网卡
ifconfig [NIC_NAME] Down
例如:
ifconfig enp0s3 down
Windows端
查看网卡
ipconfig /all
开启网卡
netsh interface set interface "NetworkAdapterName" enable
例如:
netsh interface set interface "NetworkAdapterName" enable
关闭网卡
netsh interface set interface enp0s3 disable
例如
netsh interface set interface enp0s3 disable

浙公网安备 33010602011771号