Linux user Last Login Date and Time Command

by on January 27, 2014 · 0 comments· LAST UPDATED January 27, 2014

Fig.01: last command in action on my Debian base nas server

You can use the following command on Unix or Linux to show user's last login.

last
last user
last tty
last | more
last | grep 'something

Sample outputs:

vivek     ttys002                   Mon Jan 27 18:09   still logged in
vivek     ttys008                   Mon Jan 27 17:31 - 17:51  (00:19)
vivek     ttys009  localhost        Mon Jan 27 17:30 - 17:31  (00:01)
vivek     ttys008                   Mon Jan 27 17:25 - 17:31  (00:05)
vivek     ttys007                   Mon Jan 27 17:21 - 17:51  (00:29)
vivek     ttys006                   Mon Jan 27 16:13 - 17:51  (01:37)
vivek     ttys006                   Mon Jan 27 15:54 - 16:01  (00:06)
vivek     ttys005                   Mon Jan 27 14:56 - 17:51  (02:54)
vivek     ttys004                   Mon Jan 27 14:53 - 17:51  (02:58)
vivek     ttys003                   Mon Jan 27 14:52 - 17:51  (02:59)
vivek     ttys002                   Mon Jan 27 14:51 - 17:51  (02:59)
vivek     ttys001                   Mon Jan 27 14:37   still logged in
vivek     ttys000                   Mon Jan 27 14:05   still logged in
vivek     ttys000                   Mon Jan 27 14:05 - 14:05  (00:00)
vivek     console                   Mon Jan 27 11:34   still logged in
reboot    ~                         Mon Jan 27 11:34
shutdown  ~                         Sun Jan 26 23:53
vivek     ttys008                   Sun Jan 26 21:55 - 23:39  (01:44)
vivek     ttys007                   Sun Jan 26 18:20 - 23:39  (05:18)
reboot    ~                         Sat Oct 26 10:07
shutdown  ~                         Sat Oct 26 10:06
root      console                   Sat Oct 26 10:06 - shutdown  (00:00)
vivek     ttys000                   Sat Oct 26 08:07 - 10:06  (01:58)
vivek     console                   Sat Oct 26 08:07 - 10:06  (01:58)
reboot    ~                         Sat Oct 26 08:07
shutdown  ~                         Sat Oct 26 08:06
root      console                   Sat Oct 26 08:05 - shutdown  (00:00)
vivek     ttys000                   Sat Oct 26 08:05 - 08:05  (00:00)
vivek     console                   Sat Oct 26 08:05 - 08:05  (00:00)
reboot    ~                         Sat Oct 26 08:05
shutdown  ~                         Sat Oct 26 08:04
vivek     ttys000                   Sat Oct 26 08:02 - 08:04  (00:01)
vivek     ttys000                   Sat Oct 26 08:02 - 08:02  (00:00)
vivek     console                   Sat Oct 26 07:44 - 08:04  (00:19)
reboot    ~                         Sat Oct 26 07:44
shutdown  ~                         Sat Oct 26 07:43
vivek     console                   Sat Oct 26 07:21 - 07:43  (00:22)
reboot    ~                         Sat Oct 26 07:20
wtmp begins Sat Oct 26 07:20
TwitterFacebookGoogle+Found an error/typo on this page? Help us!

Examples and usage: Linux / Unix: Check Last Time User Logged In On The System

{ 0 comments… add one now }

Leave a Comment

Tagged as: