PDA

View Full Version : Get IP address?


DSHwrd
03-06-2002, 02:25 PM
I remember doing this in Linux a few times, but have NO idea how I did it... so I'm gonna ask if it's possible in OS X.

In Linux, when you had an open internet connection and were connected to ICQ, AIM, Telnet, whatever, you could go into the terminal and type a command and were given all IP addresses and ports that were running into your computer(Through AIM, ICQ, etc...).

I was wondering if this was possible in OS X or not? I believe it should be, seeing as it was in Linux.

- Daniel H.

eriklager
03-06-2002, 05:56 PM
Try netstat, it shows you all open connections in the following format:
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp 4222 0 .50961 www.apple.com.http ESTABLISHED

Use netstat -n if you only want the ip addresses.

Erik

nseriot
03-17-2002, 11:17 AM
% AppleSystemProfiler | grep IP

osxsf
03-17-2002, 12:17 PM
now how do I get the IP address out of the prompt?