by Devin Yang
(This article was automatically translated.)

Published - 6 years ago ( Updated - 6 years ago )

Use ifconfig plus grep to filter out inet

ifconfig |grep inet
en0 (network card)
ipconfig getifaddr en0
en1 (Wifi)
ipconfig getifaddr en1

Tags: MacOS

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


Emoji, MacOS

⌘+control+blank (Emoji on Mac)

⌘+control+blank (Emoji on Mac)

vim, macos

Ultisnips requires py >= 2.7 or py3 Bugfix

If you install Vim like me, will there be an error that python2.7 or python3 is required when executing the terminal, but the system obviously has python 2.7? This article explains how I fixed this issue.

vpn,cli,macos

How do I dial a VPN from the command line on MacOS

I myself will need to use MacOS to dial VPN in the command line. Here I provide my alias and setting method