/var/run/utmp file missing on Debian 13 (trixie)
Author: mstrandbogeCreated Oct 15, 2025Updated Feb 19, 2026
Describe the bug
The /var/run/utmp file used by gopsutil's host.Users() is no longer present in Debian 13:
https://github.com/shirou/gopsutil/blob/9a9f1597ee9fbf843e82a42a0e236c7f806429ef/host/host_linux.go#L82
It seems that the intended way to handle this on Debian 13 is through systemd-logind, either by using loginctl or by using the DBus API.
Using loginctl:
$ loginctl -a --full --no-legend
2 1000 debian - 1075 user - no -
3 1000 debian - 1082 manager - no -
4 0 root - 1143 manager-early - no -
c2 0 root - 1137 user-early pts/1 no -Or some examples I found that work using busctl to call the API:
busctl call org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager ListUsersbusctl call org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager ListSessions
Some further context I found: https://lists.debian.org/debian-devel/2025/04/msg00014.html
Environment (please complete the following information):
- Linux
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.1
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ uname -a
Linux 155bfc1f3616 6.6.12-linuxkit #1 SMP Fri Jan 19 08:53:17 UTC 2024 aarch64 GNU/LinuxNote: while the above info is on aarch64, I also confirmed this to be the case on amd64
Source: shirou/gopsutil