7

Show the IP address of the computer that the 20 users who logged in to the server, in UNIX?

I used last -20 to show the last 20 user logins. Now I need to see the IP address for those users.

5
  • 1
    Please edit and explain what you're asking. What users? What server? Do you want the IPs of the remote computers that users are logging in from? What operating system? Do you actually mean UNIX or is it Linux? Are you just looking for the w command?
    – terdon
    Commented Mar 20, 2015 at 13:18
  • Please elaborate. Your first language may not be English (nor is it mine), but at least make some effort.
    – wurtel
    Commented Mar 20, 2015 at 13:18
  • who shows you the users currently logged on.
    – user236012
    Commented Mar 20, 2015 at 13:19
  • Unix and ,IPs of the remote computers that users are logging in from to the server i used the last -20 to show the last 20 users now i need to see the IP address for those users? thank you
    – hdabaja
    Commented Mar 20, 2015 at 13:21
  • If you know actual command you need, than you can always try learning more of it by using man <command>, or sometimes <command> --help.
    – madneon
    Commented Mar 20, 2015 at 14:52

1 Answer 1

21

If you need information of 20 last logged-in users you can use:

last -20 -w

to display full hosts, or

last -20 -i

to display IP numbers.

1
  • @hdabaja If this answer solved your issue, please take a moment and accept it by clicking on the check mark to the left. That will mark the question as answered and is the way thanks are expressed on the Stack Exchange sites.
    – terdon
    Commented Mar 20, 2015 at 16:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .