# apt install wtmpdb
# wtmpdb last
user pts/4 172.16.0.1 Wed Oct 28 06:47 - 06:48 (00:01)
user pts/5 172.16.0.1 Wed Oct 28 06:45 - still logged in
user pts/4 172.16.0.1 Wed Oct 28 05:28 - 06:46 (01:17)
user pts/0 172.16.0.1 Wed Oct 28 05:28 - still logged in
user pts/4 172.16.0.1 Wed Oct 28 04:27 - 05:28 (01:01)
# apt install lastlog2
# lastlog2
Username Port From Latest
user pts/4 172.16.0.1 Wed Oct 28 06:47:02 +0000 2026
# lslogins
UID USER PROC PWD-LOCK PWD-DENY LAST-LOGIN GECOS
0 root 101 0 0 root
1 daemon 0 0 0 daemon
2 bin 0 0 0 bin
3 sys 0 0 0 sys
4 sync 0 0 0 sync
5 games 0 0 0 games
6 man 0 0 0 man
7 lp 0 0 0 lp
8 mail 0 0 0 mail
9 news 0 0 0 news
10 uucp 0 0 0 uucp
13 proxy 0 0 0 proxy
33 www-data 0 0 0 www-data
34 backup 0 0 0 backup
38 list 0 0 0 Mailing List Manage
39 irc 0 0 0 ircd
42 _apt 0 0 0
991 sshd 0 0 0 sshd user
997 messagebus 1 0 0 System Message Bus
998 systemd-network 0 0 0 systemd Network Man
1000 user 22 0 0 06:47