In this video, we’ll show you a cool macOS terminal command that’ll reveal your home network’s public IP address. Which is super useful when you’re setting up a domain name for a server or configuring DNS forwards.
Note: When we talk about a public IP address, we mean the one your internet service provider gave you for your broadband connection. Just a heads up, if your ISP gave you a dynamic public IP address, that number might change over time.
- From your macOS desktop, select Spotlight Search.
- Within Spotlight Search type Terminal and press Enter on your keyboard
- Now at the command prompt type.
curl ifconfig.me
- When you press Enter on the keyboard you will be presented with the public IP address your broadband connection is currently using.
- To gracefully close your current Terminal session type:
exit
- When you press Enter on your keyboard the Terminal session will end and you can close the Terminal application.