Question

how to find my server's ip address?

how to find my server’s ip address?

i got my server name but i can not find my server ip address


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
April 2, 2020
Accepted Answer

Hi there @avanishchauhan08,

There are a few ways to do that:

  • Use the ping command to ping your hostname:
  1. ping hostname.com
  • If you are already on the server run the ip or the ifconfig commands:
  1. ifconfig
  2. ip addr

Hope that this helps! Regards, Bobby

If you’re using the ip utility from the (Debian/Ubuntu) iproute2 package, you can see all configured IP addresses on your system using:

ip address show

This can be shortened to:

ip a

You are likely to only be interested in your main network device: on DO VMs, this has the public-facing IP address. To get info for just this network adapter:

ip a show dev eth0

Some very old installs may still use the old (now deprecated) ifconfig command (from the nettools package). This is not the preferred way of handling IP addresses in Linux but here’s the command in case needed:

ifconfig eth0

i got my server name but i can not find my static server ip address

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel