HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

lastlog — Show the most recent login of all users or of a user. More information: <https://manned.org/lastlog>

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thecommandlastlogloginshowmostclirecent
linux

Problem

How to use the lastlog command: Show the most recent login of all users or of a user. More information: <https://manned.org/lastlog>.

Solution

lastlog — Show the most recent login of all users or of a user. More information: <https://manned.org/lastlog>.

Display the most recent login of all users:
lastlog


Display the lastlog record of the specified user:
lastlog --user {{username}}


Display records older than 7 days:
lastlog --before 7


Display records more recent than 3 days:
lastlog --time 3

Code Snippets

Display the most recent login of all users

lastlog

Display the lastlog record of the specified user

lastlog --user {{username}}

Display records older than 7 days

lastlog --before 7

Display records more recent than 3 days

lastlog --time 3

Context

tldr-pages: linux/lastlog

Revisions (0)

No revisions yet.