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:
lastlog2(3)ll2_new_context(3)ll2_unref_context(3)ll2_write_entry(3)ll2_read_all(3)ll2_read_entry(3)ll2_update_login_time(3)ll2_remove_entry(3)ll2_rename_user(3)ll2_import_lastlog(3)
(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
- alpine 3.22: util-linux-login-doc 2.41.6-r1 Β· GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only AND GPL-1.0-only AND LGPL-2.1-or-later AND BSD-1-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND MIT AND Public-Domain
- alpine 3.23: util-linux-login-doc 2.41.6-r1 Β· GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only AND GPL-1.0-only AND LGPL-2.1-or-later AND BSD-1-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND MIT AND Public-Domain
- fedora 43: liblastlog2-devel 2.41.6-1.fc43 Β· BSD-2-Clause
- fedora 43: liblastlog2-devel 2.41.6-1.fc43 Β· BSD-2-Clause
- fedora 44: liblastlog2-devel 2.41.6-1.fc44 Β· BSD-2-Clause
- fedora 44: liblastlog2-devel 2.41.6-1.fc44 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms