Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am usually sshed into different boxes and i forgot what ip I am logged into sometimes. Is there a command I can type to give me the ip on the box I am on.

cat /etc/*release
CentOS release 5 (Final)

this failed

ifconfig | more
bash: ifconfig: command not found
share|improve this question

migrated from Aug 23 '10 at 16:43

This question came from our site for professional and enthusiast programmers.

4 is better place for this question. – amorfis Aug 23 '10 at 13:51

how about /sbin/ifconfig?

share|improve this answer

ifconfig is probably not in your path. Try /sbin/ifconfig instead and/or adjust your $PATH.

share|improve this answer
Absolutely correct, I just had to do this same exact thing on a machine yesterday. – Mistiry Aug 23 '10 at 16:44

I use PuTTY and a unique config file for each host/ip. Lets me permanently set the title bar of the terminal window to anything, like for example the terminal host name and ip. Under Window->Behaviour. Very helpful.

-- pete

share|improve this answer

You must log in to answer this question.