1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > 用Linux命令行获取本机外网IP地址

用Linux命令行获取本机外网IP地址

时间:2022-08-26 16:37:54

相关推荐

用Linux命令行获取本机外网IP地址

?

$ curl ifconfig.me

[root@localhost ~]# curl ifconfig.me

14.23.92.186

$ curl

[root@localhost ~]# curl

14.23.92.186

$ curl ident.me

[root@localhost ~]# curl ident.me

14.23.92.186

$ curl /plain

[root@localhost ~]# curl /plain

14.23.92.186

$ curl

[root@localhost ~]# curl

14.23.92.186

$ curl tnx.nl/ip

[root@localhost ~]# curl tnx.nl/ip

14.23.92.186

$ curl

[root@localhost ~]# curl

14.23.92.186

$ curl

[root@localhost ~]# curl

curl: (7) couldn't connect to host

$ curl -s | sed 's/.*IP Address: [0−9\.]∗[0−9\.]∗.*/\1/g'

[root@localhost ~]# curl -s | sed 's/.*IP Address: [0−9\.]∗[0−9\.]∗.*/\1/g'

14.23.92.186

---------------------

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。