# 使用以下命令可以查看出口 IP 地址
# 方法 1: 使用 curl 命令通过公网 API 查询出口 IP
curl ifconfig.me
# 解释:ifconfig.me 是一个提供公网 IP 查询服务的网站,通过 curl 命令可以直接获取当前机器的出口 IP。
# 方法 2: 使用 dig 命令查询 DNS 服务器返回的 IP 地址
dig +short myip.opendns.com @resolver1.opendns.com
# 解释:dig 是一个用于查询 DNS 的工具,这里使用 opendns.com 的 DNS 服务器来查询当前机器的公网 IP。
上一篇:linux查看用户所属组
下一篇:linux重启服务命令
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站