How do I find out my IP address on a unix box? I've tried
but it doesn't exist on the system.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
ifconfig is usually in /sbin. Depending on what system you're running this mightn't be on your path (in particular, RedHat systems don't include this on the default path)
If it works then that's the issue, and you should change your path via your .bashrc (or whatever shell you're using).
I would suggest looking at the
host command. Of course, you will have to specify the name of the machine that you are on.
If you are behind some sort of NAT device, that device probably has an http interface that provides this information. First, find out its IP address either from the documentation or from the output of the route command. There should be a line that looks like this:
default 192.168.2.1 0.0.0.0 UG 0 0 0 ath0
Then connect to that IP address with your browser and see what you can find out. The rest depends on what kind of NAT device you're using.