1.Windows BAT设置网络属性:
  netsh interface ip set address "Ethernet" static 192.168.31.223 255.255.255.0 192.168.31.1
  netsh interface ip set dns "Ethernet' static 114.114.114.114

  

 

 

2.Windows Powershell设置网络属性:
  New-NetIpAddress -InterfaceAlias "以太网" -IpAddress 192.168.31.223 -PrefixLength 24 -DefaultGateway 192.168.31.1
  Set-DnsClientServerAddress -InterfaceAlias "以太网" -ServerAddresses 114.114.114.114

  

 

 

3.Linux NetworkManager设置网络属性:
  nmcli connection add con-name "Ethernet" ifname "eth0" type ethernet autoconnect yes ipv4.method manual ipv4.addresses 192.168.31.135/24 ipv4.gateway 192.168.31.1 ipv4.dns 114.114.114.114

   

 

 

4.MacOS设置网络属性:
  networksetup -setmanual "Ethernet" 192.168.31.156 255.255.255.0 192.168.31.1
  networksetup -setdnsservers "Ethernet " 114.114.114.114