首页 文章

macOS中的ip命令

提问于
浏览
-2

我想在couchbase docker容器中运行我的命令,但它说bash:ip:commant not found

我的命令是:

ip=$(ip -o route get to 8.8.8.8 | sed -n 's/.*src \([0-9.]\+\).*/\1/p')

我怎样才能做到这一点 ?

1 回答

  • 1

    brew install iproute2mac希望它也有助于检查这个问题 . Other stack question

相关问题