Install ip / ifconfig commands on macOS Monterey

On macOS if you try checking your active networks IP address information with ip command you’ll get an error message similar to one shown below:

$ ip ad
zsh: command not found: ip

To fix this you’ll need to install iproute2mac package which provides ip command management tool. The installation can be performed with brew package manager.

The brew command is not available on a fresh installation of macOS operating system. You’ll have to install it manually:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Confirm installation of brew package manager using version option:

$ brew --version
Homebrew 4.4.16
Homebrew/homebrew-core (git revision 8558bc261ac; last commit 2022-05-20)
Homebrew/homebrew-cask (git revision a32e7d047b; last commit 2022-05-20)

We can then use brew installer to download iproute2mac package on out macOS system:

$ brew install iproute2mac
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 6 formulae.

==> Downloading https://ghcr.io/v2/homebrew/core/iproute2mac/manifests/1.4.0
Already downloaded: /Users/jkmutai/Library/Caches/Homebrew/downloads/29740d3f4a646e0390f01f6fb0465188995b4860acdee21b464c20b0f2174334--iproute2mac-1.4.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/iproute2mac/blobs/sha256:2ea180af8a15eace187d17e2f95a84e417445e5175646f6f61b9931633ddf264
Already downloaded: /Users/jkmutai/Library/Caches/Homebrew/downloads/d9b68cbd675317c41388f26833ac9a2d501a811eaa61e34ee4798b1854e08c4c--iproute2mac--1.4.0.all.bottle.tar.gz
==> Reinstalling iproute2mac
==> Pouring iproute2mac--1.4.0.all.bottle.tar.gz
🍺  /usr/local/Cellar/iproute2mac/1.4.0: 6 files, 29.5KB
==> Running `brew cleanup iproute2mac`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

Now use ip command and any option to check your network devices and ip related information on macOS:

$ ip ad

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	inet 127.0.0.1/8 lo0
	inet6 ::1/128
	inet6 fe80::1/64 scopeid 0x1
en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether ac:de:48:00:11:22
	inet6 fe80::aede:48ff:fe00:1122/64 scopeid 0x4
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 3c:22:fb:86:ed:6d
	inet6 fe80::1843:7da0:94ac:1ca4/64 secured scopeid 0x6
	inet 192.168.100.19/24 brd 192.168.100.255 en0
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	ether 9a:27:94:25:58:44
	inet6 fe80::9827:94ff:fe25:5844/64 scopeid 0x7
llw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 9a:27:94:25:58:44
	inet6 fe80::9827:94ff:fe25:5844/64 scopeid 0x8
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
	inet6 fe80::583b:6098:565b:1a4b/64 scopeid 0xe
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000

For a specified single interface:

$ ip link show dev en0
ip               en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=400<CHANNEL_IO>
	ether 3c:22:fb:86:ed:6d
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect
	status: active

$ ip addr show dev en0
ip               en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 3c:22:fb:86:ed:6d
	inet6 fe80::1843:7da0:94ac:1ca4/64 secured scopeid 0x6
	inet 192.168.100.19/24 brd 192.168.100.255 en0

This was a short guide on how to fix “command not found: ip” on macOS Big Sur / Monterey and any other versions. Here are other related articles on macOS operating system:

Your IT Journey Starts Here!

Ready to level up your IT skills? Our new eLearning platform is coming soon to help you master the latest technologies.

Be the first to know when we launch! Join our waitlist now.

Join our Linux and open source community. Subscribe to our newsletter for tips, tricks, and collaboration opportunities!

Recent Post

Leave a Comment

Your email address will not be published. Required fields are marked *

Related Post

Google Drive is a fantastic cloud storage service that allows you to upload, share, and sync data across several computers. […]

Ceph Storage is a free and open source software-defined, distributed storage solution designed to be massively scalable for modern data […]

In day-to-day life, using a single Desktop environment can be boring and one may be required to switch to another […]

Let's Connect

Unleash the full potential of your business with CloudSpinx. Our expert solutions specialists are standing by to answer your questions and tailor a plan that perfectly aligns with your unique needs.
You will get a response from our solutions specialist within 12 hours
We understand emergencies can be stressful. For immediate assistance, chat with us now

Contact CloudSpinx today!

Download CloudSpinx Profile

Discover the full spectrum of our expertise and services by downloading our detailed Company Profile. Simply enter your first name, last name, and email address.