Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to query public network IP by Linux

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "Linux how to query the public network IP", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Linux how to query the public network IP" bar!

Linux query public network IP specific method: Curl plain text format output: curl icanhazip.com curl ifconfig.me curl curlmyip.com curl ip.appspot.com curl ipinfo.io/ip curl ipecho.net/plain curl www.trackip.net/icurl JSON format output: curl ipinfo.io/json curl ifconfig.me/all.json curl www.trackip.net/ip?json (a little ugly) curl XML format output: curl ifconfig.me/all.xmlcurl get all IP details (mining (machine) curl ifconfig.me/all uses DYDNS (useful when you are using DYDNS services) curl-s' http://checkip.dyndns.org' | sed 's/.*Current IP Address:\ ([0-9\.] *\). * /\ 1curl-s http://checkip.dyndns.org/ | grep-o "[[: digit:].]\ +" use Wget instead of Curl wget http://ipecho.net/plain-O-Q Echo wget http://observebox.com/ip-O-Q; echo uses host and dig commands. If you have one, you can also use host and dig commands directly.

Host-t a dartsclink.com | sed 's/.*has address / /' dig + short myip.opendns.com @ resolver1.opendns.combash script example: #! / bin/bash PUBLIC_IP= `wget http://ipecho.net/plain-O-Q Echo`echo $PUBLIC_IP Thank you for your reading. The above is the content of "how to query the public network IP by Linux". After the study of this article, I believe you have a deeper understanding of how to query the public network IP by Linux, and the specific usage needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report