From time to time, I need my public ip-address and I always have to search online how to get it. And I always make the same mistake:
I search for a terminal command or where I can find the address in the settings of my computer.
Actually, this is not a trivial task. Because it is not a setting in your computer. It is an internet-provider-issued address that you may find in your router or ip-settings. And of course all this is different across operating systems.
That is why I was happy to find this website that does nothing else but show me my public IP address.
Now you can just copy the address and paste it where you need it!
If you see an address like this 2a02:6b8:c0a:1a3f:abcd:ef12:3456:7890 and you prefer an IPv4 address, then use this curl command:
curl -4 https://ipecho.net/plain
Written by Loek van den Ouweland on Dec. 24, 2025.