LASTLOG2(3)

πŸ’– LASTLOG2 β€” the iconique, Y2038-safe lastlog library πŸ’–

okay bestie, so this whole page is LASTLOG2(3) from the Programmers Manual section β€” like, it's a library page, not a command, so no shell shenanigans here, just vibes and function calls πŸŽ€


✨ NAME ✨

lastlog2 β€” the Y2038 safe version of the lastlog library. no cap, she's built different πŸ•°οΈβœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <lastlog2.h>

that's it, that's the whole vibe check. one include and you're in πŸ’…


🌸 DESCRIPTION 🌸

so lastlog2 reports the last login of a given user, or of all the users who did ever login on a system. it's giving "who's been here and when" energy πŸ‘‘

It's using sqlite3 as the database backend β€” yes bestie, sqlite, we love a lowkey reliable queen πŸ’œ

Data is only collected via a PAM module, so that all tools can make use of it, without modifying existing packages. like, everyone eats from the same table, nobody has to rebuild their whole plate 🫢

The output is as compatible as possible with the old lastlog implementation β€” so if you're migrating, she's not gonna show up in a completely different outfit, she's matching the old aesthetic ✨

By default, the database will be written as /var/lib/lastlog/lastlog2.db.

And here's the part that ate: the size of the database depends on the amount of users, not how big the biggest UID is. literally no bloat, no giant-UID problems, just proportionate slay πŸ’…πŸ”₯

ngl this is the whole "Y2038 safe" moment β€” the old one was out here with timestamps that weren't gonna age well, and this one's like "not me, I'll be fine" 😭

πŸ‘‘ AUTHORS πŸ‘‘

Thorsten Kukuk <kukuk@suse.de> β€” the main character who made this happen, we stan πŸŽ€


πŸŽ€ SEE ALSO πŸŽ€

the whole friend group, fr fr:

(yes lastlog2(3) is in its own SEE ALSO. self-love, iconic, no notes πŸ™ˆ)


πŸ’€ REPORTING BUGS πŸ’€

For bug reports, use the issue tracker: https://github.com/util-linux/util-linux/issues

please be nice to the maintainers, they're doing their best 🫢


🌈 AVAILABILITY 🌈

The liblastlog2 library is part of the util-linux package since version 2.40. It can be downloaded from the Linux Kernel Archive: https://www.kernel.org/pub/linux/utils/util-linux/


and that's the whole page bestie β€” this was util-linux 2.41.6, dated 2026-08-31, dropping on LASTLOG2(3) like the baddie she is. πŸ’–βœ¨πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from