10/01/2560

Linux Command แสดง IP address ( Public IP)

กรณีที่ใช้ Command line แล้วอยากทราบ IP
สามารถใช้คำสั่ง

curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
เพื่อให้แสดงผลได้ครับ

ผลที่ได้จะเป็น Ipaddress ที่เราออกอินเตอร์เนต

ที่มา
http://askubuntu.com/questions/95910/command-for-determining-my-public-ip

ไม่มีความคิดเห็น:

แสดงความคิดเห็น