shell一键查询公网IP地址
shell一键查询公网IP地址。命令如下
curl -s http://myip.ipip.net
也可以直接写成shell脚本
1
2
3
4
#!/bin/bash
ip=$(curl -s http://myip.ipip.net)
echo "My public IP address is: $ip"
下面是常有的IP公网地址查询地址。
curl http://icanhazip.com
curl http://ifconfig.me
curl http://curlmyip.com
curl http://ipinfo.io/ip
💘 相关文章
- mac os brew "shell-init: error retrieving current directory"的解决方法
- ipv6 /64的可用IP地址計算方法
- 一键安装最新版或者指定版本的nodejs
- 分享一款一键自动搭建CDN服务器脚本
- OpenLiteSpeed一键安装脚本
- shellcheck 幫助新手的你寫出更好的shell腳本
- shell彩色终端的实现方法
- Configure nginx to only allow cloudflare's IP to connect to the server shell script
- 通过web获取客户端的内网ip地址
- shell脚本批量生成连续数字