When you type ipconfig getifaddr en0 (or en1 for older Macs), the Terminal spits back a string like 192.168.1.42. That’s your private IP address—the local handle your router uses to find you in the home network party. Think of it as your apartment number in the building of your house.
Fun fact: The en0 refers to “Ethernet Network 0”—your Wi-Fi interface on modern MacBooks. If you’re feeling retro, use ifconfig instead, a broader command that shows everything from network interfaces to dropped packets. It’s like ordering the full menu instead of just the special.
Don’t confuse this with your public IP address—that’s the umber you show the internet. Your private IP is intimate, shared only with your router. It’s the difference between your home address and your mailbox number at the post office.
Practical Tip: Troubleshoot Like a Pro
Ever had your Wi-Fi just… stop? Before you panic-buy a new router, run ipconfig getpacket en0. This command dumps your DHCP lease details—the rental agreement your router gives you for a temporary IP. If the lease time is “0”, your router might be ghosting you.
Another lifesaver: sudo ipconfig set en0 DHCP. This forces your Mac to beg for a fresh IP lease from the router. It’s the digital equivalent of shouting, “Hello? Anyone home?” Usually, it works. If not, you’ve got a real house party problem.
Pop culture alert: In the movie The Social Network, hackers use ifconfig to scrape network data. You’re now one command away from that scene’s energy—minus the plagiarism lawsuit.
Mpv Config File Location Mac at Charles Casale blog