• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

Lastlog

March 6, 2019

Lastlog displays the latest login information of all users in the system. You can’t view the lastlog file since it’s not an ascii file. You’ll need to run the actual command to view what’s in it. The program will spit out a list that may be longer than your terminal buffer. In that case, it’s best to pipe the output to “more” or better yet, use the “grep” command to isolate the user.

lastlog | more
lastlog | grep johndoe

lastlog | more lastlog | grep johndoe

Filed Under: Linux Tagged With: grep, info, lastlog, login, more

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023