How to find Public IP address AWS EC2 or Lightsail VM

Originally published at: https://www.cyberciti.biz/faq/how-to-find-public-ip-address-aws-ec2-or-lightsail-vm/

I need to get public IPv4 address on current EC2 or Lightsail VM Linux/Unix instance. How do I find Public IP address AWS EC2 or Lightsail VM?

Please give that terminal theme/color scheme,I love it!

@Vasil_Vasilev
That is just an image edited in GIMP. Not terminal theme.

Since you seem to have the dns name (as you ssh into the machine), and this is a simple non load balance setup; why not just ping the dns name? That will show you the resolved ip address.

okay can i have the image :smiley:

Does this help?

Yes, thank you :slight_smile:


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki