to find ip address

Posted on 2014-02-25
Medium Priority
Last Modified: 2014-03-04
How will we find the ip address for this machine


This is sunsolaris
Question by:thomasliju
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 19

Expert Comment

ID: 39885835
try to use ping command.
ping nyspcor01g
if nyspcor01g is a hostname you should get back recolved IP
LVL 77

Accepted Solution

slightwv (䄆 Netminder) earned 1000 total points
ID: 39885836
ifconfig -a
LVL 40

Assisted Solution

omarfarid earned 1000 total points
ID: 39885849
you may run the command

ifconfig -a

which will show you the network interfaces and their IPs


you could run

grep `hostname` /etc/hosts


nslookup `hostname`
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Expert Comment

by:Shahnawaz Ahmed
ID: 39885868
Dear thomasliju,

You will find by the below 2 commands, give a try now

ifconfig -a  

cat /etc/hosts | grep <server_name>
LVL 74

Expert Comment

ID: 39885877
Since the question was originally posted in the Oracle Database topic area, I'll assume you want an Oracle solution as well.

use the UTL_INADDR package

select UTL_INADDR.get_host_address('nyspcor01g') from dual;

Note, in 11g or higher databases you'll need an ACL that allows the RESOLVE privilege

Author Comment

ID: 39886322
This is good for any servers..
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39886328

Can you explain why you accepted the post you did? ifconfig and /etc/hosts had both been posted previously.

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question