Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 would like to know if there is an option to get the IP address of loged users with who command?

When I type who I get this:

wolfy@wolfy-server:~$ who

wolfy pts/0 2012-06-01 09:43 (

I would like to replace "" with a real IP address, like in "last" command:

wolfy@wolfy-server:~$ last -i

wolfy pts/0 Fri Jun 1 09:43 still logged in

I did not find any options to do that... do you know a way to do this... maybe a different command?

share|improve this question
up vote 2 down vote accepted

You can use the --ips switch.

To quote the manual:


Print ips instead of hostnames. With --lookup, canonicalizes based on stored IP, if available, rather than stored hostname.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.