Useful macOS network terminal commands – How to find your Public IP address


In this video, we take a look at a macOS terminal command that will display the public IP address that is being used by your home network. This command can be particularly handy when assigning a domain name to a server or when setting up DNS forwards

Note: When referring to term public IP address, we mean the IP address that was assigned to your broadband connection by your Internet Service Provided. It’s also worth noting that if your ISP assigned you with a dynamic public IP address, that IP address will over time change.

Quick reference notes:

  • 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.

Reference Material:

Wikipedia article – Terminal (macOS)

Thank you for your support

Advertisement

%d bloggers like this: