Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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'm trying to sort the output of the who command but I guess I'm kinda lost on this one.

I want to sort it based on who just logged in.


share|improve this question
Can you give us some sample output and explain which fields you want to sort on exactly? (Does who | sort -k3 do what you want?) – Etan Reisner Jul 11 '13 at 19:27

Do you try using sort command:

who | sort -r -k3
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.