ubuntu ipconfig
sudo vi /sbin/ipconfig
Bash代码
#! /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 ;
Shell代码
sudo chmod +x /sbin/ipconfig
ipconfig
查看更多关于ubuntu ipconfig - Linux操作系统:Ubuntu_Centos_Debian -的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did21850