Check your IP from the command line
If you are working on a server over SSH or in a console without a browser, you can get your public IP with a single command. Show my IP replies in plain text to curl, wget and PowerShell, with no HTML, ready to use in scripts.
Your IP in one command
Type this in a Linux, macOS or Windows terminal and you will get just your public IP:
curl vermiip.es
Reply for your current connection: 216.73.217.78
Commands for each system
| Linux, macOS and Windows 10/11 (curl) | curl vermiip.es |
|---|---|
| Linux with wget | wget -qO- vermiip.es |
| Windows PowerShell | irm vermiip.es |
| Force IPv4 | curl -4 vermiip.es |
| Force IPv6 | curl -6 vermiip.es |
Everything you can query
Add a path to get a single value. These paths return plain text to any client, including a browser. The last column shows what they would return to your browser right now.
| Command | Returns | Your value now |
|---|---|---|
curl vermiip.es/ip |
Your public IP (IPv4 or IPv6) | 216.73.217.78 |
curl vermiip.es/ua |
Your user agent | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
curl vermiip.es/lang |
Accepted languages (Accept-Language) | – |
curl vermiip.es/encoding |
Accepted compression (Accept-Encoding) | gzip, br, zstd, deflate |
curl vermiip.es/mime |
Accepted content types (Accept) | */* |
curl vermiip.es/charset |
Accepted character sets (Accept-Charset) | – |
curl vermiip.es/forwarded |
X-Forwarded-For header, if you go through a proxy | – |
curl vermiip.es/country |
ISO code of your IP's country | US |
curl vermiip.es/city |
Approximate city of your IP (in English) | Columbus |
curl vermiip.es/host |
Your connection name (reverse DNS); may take a few seconds | |
curl vermiip.es/all |
All the above as text, one per line (except reverse DNS) | |
curl vermiip.es/all.json |
All the above as JSON |
Script examples
# Store the IP in a variable (bash)
IP=$(curl -s vermiip.es)
# Your IP's country with JSON and jq
curl -s vermiip.es/all.json | jq -r .country
# Your IPv4 and your IPv6
curl -s4 vermiip.es; curl -s6 vermiip.es
# PowerShell: store the IP in a variable
$ip = Invoke-RestMethod vermiip.es/ip
Why check your IP from the command line?
On a headless server, in an SSH session or inside a container there is no browser to open a website. With curl vermiip.es you instantly know which public IP that machine uses to reach the internet.
It is also handy in scripts: check whether the IP has changed to update a dynamic DNS record or a firewall rule, make sure a VPN or proxy is active, or log where a scheduled task runs from.
IPv4 and IPv6
Show my IP has both an IPv4 and an IPv6 address, so curl vermiip.es answers over whichever version your computer chooses, usually IPv6 if your connection has it. To ask for a specific one use curl -4 or curl -6, or the ipv4.vermiip.es and ipv6.vermiip.es subdomains, which only have one of them; if your connection has no IPv6, the request to ipv6.vermiip.es will fail.
On the home page you can see both at once, along with your IP's approximate location on a map.
Over HTTP and HTTPS
To keep the command as short as possible, the command-line replies are also served over plain HTTP, without redirecting to HTTPS, because curl and wget do not follow redirects by default. If you prefer an encrypted connection, use curl https://vermiip.es.
The bare vermiip.es address only replies in plain text to console clients (curl, wget, HTTPie, PowerShell…); a browser gets the normal website. Paths such as /ip or /all.json reply the same way to any client.