Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How I discover my IP? 1

Status
Not open for further replies.

Diogo

Technical User
Mar 22, 2001
143
PT
Hello!!!

After to make a linking to machine, with that command I obtain to know which my IP?

Thanks any way.

DR
 
nslookup <machine name>

or view /etc/hosts
 
You are not perceived.
I have an user that the machine is connected, and I liked to know which the IP of where it is connecting itself.
Then if I had this information, later I sent it for a filing-cabinet of log.
 
who -i will give you either the IP or the fully qualified domain name of all who are logged in at the time.

last will also give you that information for those currently logged in and all the way back to when wtmp was created.
 
It does not have another command, that gives this information?
 
Your question is not clear, are you asking how to know the IP address of your server or the IP address of a client with whom you are connected to the server.
ifconfig -a will give you all the IP addresses related to your server.
who -i (as bi said) will give you all the addresses of the connected users
 
Also,

To show who is connected to my AIX over IP(including NFS and telnets),I use something strange like:

netstat -a|grep –i establ|grep -vE &quot;`hostname.*`hostname`|localhost|loopback&quot;|awk '{ print $5 }'|grep -v `hostname`|cut –f 1,2,3,4 –d .|sort –u

This gives me just the view I need.


&quot;Long live king Moshiach !&quot;
 
Very clever levw, enjoy your purple star ... Happy Hannukah (Have I wrote correct?)
 
i noticed that some of your replys did not include the &quot;pg&quot; command pg /etc/hosts. This is how I view IP's on my machines.
 
solarisone40 ,

The question was not to view the /etc/hosts,but to check who is physically actively connected to myself over any IP protocol.


&quot;Long live king Moshiach !&quot;
 
Just two lines' commands get your IP.
First:tty
Sec:who | grep your tty
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top