aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes how to get IP address in linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "how to get IP address in linux" Watch "how to get IP address in linux" New topic
Author

how to get IP address in linux

shiva kumar nanda
Greenhorn

Joined: May 10, 2007
Posts: 8
Hi,
I am working on Linux.
I have a problem of getting the IP Address.
Can any one help me in getting the IP Address.
And my IP Address changes day by day.

Using InetAddress class i am able to get the IP Address on Windows, but this is failing on Linux.

Thank You
Arun Bommannavar
Ranch Hand

Joined: Jan 11, 2003
Posts: 53
What are you getting when you do InetAddress.getLocalHost()?.
what does your /etc/hosts have?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get IP address in linux
 
Similar Threads
Determining Servers IP
deployment
Setup internet on Linux using a DSL router
connecting to linux using ftp
InetAddress's getHostName() Fails to work.