Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Using the who command, I can find which users are currently logged into a machine.

I would like to determine which users have logged into my machine in the past, and the length of those sessions. Is this information retained, and can I access it?

The particular machine I'm thinking of is running Ubuntu 10.10.

share|improve this question
add comment

1 Answer 1

up vote 10 down vote accepted

You can use the last command for this. It will tell you who logged in, what port/tty, date, time and duration of the session.

Here is the man page

FWIW, every installation of Ubuntu I've had, had this command available.

share|improve this answer
add comment

Your Answer

 
discard

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.