网卡命令ifconfig

• ifconfig

• service network restart

• ifdown eth0

• ifdown eth0

 

#linux下run network
export USER=lizh
export SERVERIP=192.168.160.51
export STBIPADDR=192.168.162.127
export GATEWAY=192.168.162.1
export MACADDR=00:15:c0:12:02:19
ifconfig eth0 down
ifconfig eth0 hw ether ${MACADDR}
ifconfig eth0 up
sleep 1
ifconfig eth0 ${STBIPADDR}
route add default gw ${GATEWAY}
mount -t nfs -o nolock,tcp ${SERVERIP}:/home/$USER/export /root

posted on 2021-04-28 17:07  Meer6767  阅读(162)  评论(0)    收藏  举报