WTMPDB(8)
๐ NAME ๐
okay bestie, welcome to the wtmpdb(8) page โ this is the manual for wtmpdb, and it displays login, logout and reboot information. that's the whole vibe. it's giving system-archaeology but make it cute. ๐
๐ธ SYNOPSIS ๐ธ
wtmpdb COMMAND [option...]
โจ DESCRIPTION โจ
so basically wtmpdb does two jobs and it does them both flawlessly, no cap:
- it displays the content of the wtmp login and boot times database ๐
- it gives you sub-commands so system scripts can create boot and shutdown entries, and otherwise manipulate the wtmp database ๐ ๏ธ
and here's the iconic part: this command is year 2038-safe and it uses sqlite3 to store the information. she's future-proofed, she's built different, we love her for that. ๐ซถ
๐ COMMANDS ๐
these are the commands that are understood:
๐ฆ last [option...] [username...] [tty...]
wtmpdb last goes through the /var/log/wtmp.db database (or the database designated by the -f option) and displays a list of of all users logged in and logged out. yes that typo is in the original, i'm keeping it, character for character, it's part of the lore. ๐
the output can be restricted to different patterns via various options. and if one or more usernames and/or ttys are given, wtmpdb last will only show the entries matching those arguments. so specific. so focused. main character energy. โญ
ngl the login and logout times of the special userrebootare the boot and shutdown times of the system. yes really.rebootis a user. she contains multitudes. ๐
-a,--hostlastโ displays hostnames in the last column.-d,--dnsโ translates IP addresses into a hostname.-f,--file FILEโ use FILE as the wtmpdb database.-F,--fulltimesโ displays full times and dates.-i,--ipโ translates hostnames to IP addresses.-n,--limit N,-Nโ displays only the first N entries.-p,--present TIMEโ displays who was present at TIME.-R,--nohostnameโ don't display any hostname or IP address.-S,--serviceโ displays PAM service used to login.-s,--since TIMEโ prints only records more recent than TIME.-t,--until TIMEโ prints only records until TIME.-w,--fullnamesโ displays full IP addresses and user and domain names.-x,--systemโ displays system shutdown entries.--time-format FORMATโ displays timestamps in the specified FORMAT. the format can benotime,short,full, oriso.notimewill not display times at all,shortis the default option,fullwill display the full times and dates, andisowill display times in ISO-8601 format. periodt. โฐ
TIME must be in the format "YYYYMMDDHHMMSS", "YYYY-MM-DD HH:MM:SS", "YYYY-MM-DD HH:MM", "YYYY-MM-DD", "HH:MM:SS", "HH:MM", "now", "today", "yesterday" or "tomorrow" (time will be set to 00:00:00 if not specified; the date to today's).
๐ boot [option...]
wtmpdb boot writes system boot times to the /var/log/wtmp.db database. she's logging the moment the machine wakes up. iconic behavior honestly. ๐
-f,--file FILEโ use FILE as the wtmpdb database.-q,--quietโ don't print informative messages.
๐ shutdown [option...]
wtmpdb shutdown writes system shutdown requests to the /var/log/wtmp.db database. goodbye bestie, see you at the next boot. ๐ญ
-f,--file FILEโ use FILE as the wtmpdb database.
๐ rotate [option...]
wtmpdb rotate exports old log entries to the /var/log/wtmp_yyyymmmdd.db database and removes these entries from the original one. it's a glow-up for your logs. old entries get a new home, the original stays fresh. โจ
-f,--file FILEโ use FILE as the wtmpdb database. The exported DB file will be on the same location.-d,--days DAYSโ entries will be exported which are older than DAYS days. Default is60days.
๐ import [option...] file...
wtmpdb import imports legacy wtmp log files to the /var/log/wtmp.db database. bringing the old stuff into the new era. heritage moment. ๐ง
-f,--file FILEโ use FILE as the wtmpdb database.
โญ global options โญ
-h,--helpโ display help message and exit.-v,--versionโ print version number and exit.
๐๏ธ FILES ๐๏ธ
/var/log/wtmp.dbโ Wtmpdb logging database file/var/lib/wtmpdb/wtmp.dbโ Symbolic link from the upstream location to the above database file
๐ฅ SEE ALSO ๐ฅ
๐ AUTHOR ๐
wtmpdb was written by Thorsten Kukuk <kukuk@suse.com>.
ok that's the whole page bestie, no notes, 10/10, ate and left no crumbs ๐ซถ
that was wtmpdb version 0.75.0, dated 12/02/2025, and it lives in the wtmpdb(8) section of the manual. mwah. ๐
โจ
๐ฆ where this page comes from
- ubuntu resolute: wtmpdb 0.75.0-5ubuntu1 ยท BSD-2-Clause
- ubuntu stonking: wtmpdb 0.75.0-5ubuntu1 ยท BSD-2-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms