utmpset(8)
β¨ utmpset β the logout glow-up β¨
ok bestie, welcome to the utmpset(8) page π she's a tiny little System Manager's Manual darling and she has ONE job: she logs you out of the accounting books. let's get into it.
π NAME π
utmpset β logout a line from utmp and wtmp file
π¦ SYNOPSIS π¦
utmpset [ -w ] line
like. that's it. that's the whole summoning ritual. one little line and optionally a -w and you're done π
πΈ DESCRIPTION πΈ
so the utmpset program modifies the user accounting database utmp(5) β and optionally wtmp(5) β to indicate that the user on the terminal line has logged out. that's the whole vibe. it's giving "closing the tab on your session" π«Ά
ordinary init(8) processes handle utmp file records for local login accounting. but the runit(8) program? she doesn't include code to update the utmp file, so the getty(8) processes are handled the same as all other services. no special treatment, no favorites, everyone's equal in the runit household π
so if you want local login accounting to actually work, you gotta add utmpset to the getty(8) finish scripts. for example, bestie:
$ cat /service/getty-5/finish
#!/bin/sh
exec utmpset -w tty5
$
iconic. that's the whole setup. finish script runs, utmpset does its little thing, accounting stays cute π
β¨ OPTIONS β¨
-wβ wtmp. additionally to the utmp file, write an empty record for line to the wtmp file. so like, utmp gets the update, and wtmp gets an empty record too. two files, one flag, no cap π
π₯ EXIT CODES π₯
ngl these are specific and you should know them:
utmpsetreturns111on error π1on wrong usage π0in all other cases π
π SEE ALSO π
go read these next, they're all part of the family fr fr:
and if you wanna go deeper (main character energy tbh):
π AUTHOR π
Gerrit Pape <pape@smarden.org>
and that's the page bestie!! utmpset(8) β straight out of the System Manager's Manual, living on smarden.org/runit, written by Gerrit Pape, and she said what she said π β¨ you're welcome, go log out responsibly π¦
π¦ where this page comes from
- alpine 3.24: runit-doc 2.3.1-r0 Β· BSD
- nixpkgs unstable: runit 2.3.1
- ubuntu resolute: runit 2.3.0-1ubuntu1 Β· BSD-3-Clause
- ubuntu stonking: runit 2.3.1-5ubuntu1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms