`
seavers
  • 浏览: 170358 次
  • 来自: ...
社区版块
存档分类
最新评论

ubuntu ipconfig

阅读更多
sudo vi /sbin/ipconfig

#! /bin/bash
for word in `ifconfig eth0 | grep "inet addr" | sed  's/          inet addr/addr/g'`; do echo $word | sed 's/:/\t/g'; done
route -n | awk '/UG/ {printf "gateway    %-21s %s\n", $2,$8}' ;
grep nameserver /etc/resolv.conf ;



sudo chmod +x /sbin/ipconfig

ipconfig






---------
待改进
  • 支持eth0 与 wlan0
  • 支持dnsmasq






分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics