Thursday, February 12, 2026

How to get my public IP in Linux with cmd?



There are times when you are on a cmd only set up and you want to know your current public IP. This little command may help you.

curl ifconfig.co

 If you specifically want IPv4 address, you add -4 switch to the command as below.

 curl -4 ifconfig.co

 

No comments: