by Devin Yang
(This article was automatically translated.)

Published - 5 years ago ( Updated - 5 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


Restart the sshd service on MacOS

Document how I restart the sshd service on MacOS.


How to use find to delete old files based on the creation time

This function is very useful, but be very careful, read it first and then delete it, if you make a wrong directory, you will die miserably 


PS aux will you?

For Linux system administrators, you must understand the ps aux command. If you want to be a Linux system administrator, or you are a Linux user, you should understand this command. ps is process status For short, anyone can find out what kind of program is running on the system and how the status is executed through this command. I saw some programs that should not appear, maybe the system was hacked and used to mine🥹