mac 查看本机ip

创建 ip.sh 文件,文件内容为

ifconfig -a | grep -e "inet[^6]" |\

  sed -e "s/.*inet[^6][^0-9]*\([0-9.]*\)[^0-9]*.*/\1/" |\

  grep -v "^127\."

chmod a+x ip.sh

就可以用了

posted on 2020-07-20 11:06  bbb324  阅读(150)  评论(0编辑  收藏  举报

导航