OS Manuals

/usr/bin/lastlog2

Misc binaries for util-linux

From util-linux-misc 2.42.4-r2 (os), captured 2026-11-05 by running lastlog2 --help (exit 0). permalink

Usage:
 lastlog2 [options]

Options:
 -a, --active            print lastlog excluding '**Never logged in**' users
 -b, --before DAYS       print only records older than DAYS
 -C, --clear             clear record of a user (requires -u)
 -d, --database FILE     use FILE as lastlog2 database
 -i, --import FILE       import data from old lastlog file
 -r, --rename NEWNAME    rename existing user to NEWNAME (requires -u)
 -s, --service           display PAM service
 -S, --set               set lastlog record to current time (requires -u)
 -t, --time DAYS         print only lastlog records more recent than DAYS
 -u, --user LOGIN        print lastlog record of the specified LOGIN

 -h, --help              display this help
 -V, --version           display version

For more details see lastlog2(8).
Options (12)
OptionDescriptionSource
-a, --activeDo not print entries for users who have never logged in.help + man
-b, --before DAYSPrint only the last-login records older than days.help + man
-C, --clearClear the last-login record of a user.help + man
-d, --database FILEUse file as lastlog2 database.help + man
-i, --import FILEImport data from an old lastlog file named file.help + man
-r, --rename NEWNAMERename the user given with -u to this newname.help + man
-s, --serviceDisplay the PAM service used to login in the last column.help + man
-S, --setSet the last-login record of a user to the current time.help + man
-t, --time DAYSPrint only last-login records more recent than days.help + man
-u, --user LOGINPrint (or modify) the last-login record of the user login.help + man
-h, --helpDisplay help text and exit.help + man
-V, --versionDisplay version and exit.help + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.