MacでIPコマンドを使う
about
世の中はすっかりnet-toolsを忘れてiproute2に移行している。 かくいう自分も会社ではRHEL7を使うことが多いので、家のMacでもipコマンドをうちたい。
Homebrewで検索
brewで入らないか検索をする
$ brew search iproute2 ==> Formulae iproute2mac
あった
Hombrewでインストール
サックと入れる
$ brew install iproute2mac ==> Installing dependencies for iproute2mac: gdbm ==> Installing iproute2mac dependency: gdbm ==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.17.high_sierra.bottl ######################################################################## 100.0% ==> Pouring gdbm-1.17.high_sierra.bottle.tar.gz 🍺 /usr/local/Cellar/gdbm/1.17: 20 files, 581.4KB ==> Installing iproute2mac ==> Downloading https://github.com/brona/iproute2mac/releases/download/v1.2.1/ip ==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws ######################################################################## 100.0% 🍺 /usr/local/Cellar/iproute2mac/1.2.1: 6 files, 21.2KB, built in 4 seconds
動作確認
ドキドキのip
コマンド
$ ip Usage: ip [ OPTIONS ] OBJECT { COMMAND | help } ip -V where OBJECT := { link | addr | route | neigh } OPTIONS := { -4 | -6 } iproute2mac Homepage: https://github.com/brona/iproute2mac This is CLI wrapper for basic network utilities on Mac OS X inspired with iproute2 on Linux systems. Provided functionality is limited and command output is not fully compatible with iproute2. For advanced usage use netstat, ifconfig, ndp, arp, route and networksetup directly.
wrapperだからいざ言う時はnet-tools系のコマンド使え言うとるね
For advanced usage use netstat, ifconfig, ndp, arp, route and networksetup directly.
終わり