To get your public IP address or external IP address, you can use any one of these sites:
You can visit them from your web browser, and it will return your public IP address in plaintext format.
If you want to get your public IP address from your terminal, you have options such as:
- Command prompt (CMD)
- Linux/Bash based terminals
curl in PowerShell usually requires some configuration to get started however, the best way to make an API request on PowerShell is with the
Invoke-RestMethod. If you run:
You will get your public IP address as a plaintext response.
Command Prompt (CMD)
In the latest versions of Windows OS,
curl comes standard with the command prompt (CMD).
If your Windows OS did not come with
curl, you will need to download it from the official site and install it and add it to your PATH environment variable.
Unix like/based terminals
There are a few terminal solutions that replicate the Unix experience on Windows. Such as:
- Git Bash (MinGW)
- Windows Subsystem for Linux
- GNU on Windows etc.
In these terminals,
curl may come with the standard install. If not, you can easily install it.