本文最后更新于 2017年7月22日 17:39 可能会因为没有更新而失效。如已失效或需要修正,请留言
创建如下的sh脚本,运行即可:
# !/bin/bash for ((i=0;i<=3;i=i+1)) do echo "auto eth0:$i">>/etc/network/interfaces echo "iface eth0:$i inet static">>/etc/network/interfaces let j=$i+179 echo "address 45.41.89.$j">>/etc/network/interfaces echo "netmask 255.255.255.248">>/etc/network/interfaces echo "gateway 45.41.89.177">>/etc/network/interfaces echo " ">>/etc/network/interfaces done # end
转自:http://9283898.blog.51cto.com/9273898/1688876