LSLOGINS(1)
๐ LSLOGINS(1) โ the lslogins manual, but make it cute ๐
okay bestie, welcome to lslogins(1) โ yes that's the manual page name, and yes we're reading it together, grab a snack ๐
๐ธ NAME ๐ธ
lslogins โ display information about known users in the system
โจ SYNOPSIS โจ
lslogins [options] [-s|-u[=UID]] [-g groups] [-l logins] [username]
๐ฆ DESCRIPTION ๐ฆ
So what does it actually do? It goes and examines the wtmp and btmp logs, peeks at /etc/shadow (only if necessary, mind you), and also /passwd, and then outputs all the data you asked for. Lowkey nosy but in a helpful way ๐
The optional username argument forces lslogins to print all available details about the specified user only. Heads up though: when you do that, the output format is different than with -l or -g, and an unknown username gets reported as an error. Not a vibe, but okay.
The default action? List info about all the users in the system. Main character behavior honestly ๐
๐ OPTIONS ๐
Mandatory arguments to long options are mandatory for short options too. (yes, that rule still applies, no shortcuts bestie)
-a,--acc-expirationโ Display data about the date of last password change and the account expiration date (peepshadow(5)for more info). ๐ Requires root privileges, so don't try this one without the crown.--btmp-filepath โ Alternate path forbtmp.-c,--colon-separateโ Separate info about each user with a colon instead of a newline.-e,--exportโ Output data in the format ofNAME=VALUE. Also see option--shell.-f,--failedโ Display data about the users' last failed login attempts. ๐ญ the flop era receipts-G,--supp-groupsโ Show information about supplementary groups.-g,--groupsgroups โ Only show data of users belonging to groups. More than one group may be specified; the list has to be comma-separated. Unknown group names are ignored.
Note that the relation between user and group may be invisible for the primary group if the user is not explicitly specified as group member (e.g., in /etc/group). If the command lslogins scans for groups then it uses the groups database only, and the user database with primary GID is not used at all.
-L,--lastโ Display data containing information about the users' last login sessions.-l,--loginslogins โ Only show data of users with a login specified in logins (user names or user IDs). More than one login may be specified; the list has to be comma-separated. Unknown login names are ignored.-n,--newlineโ Display each piece of information on a separate line.--noheadingsโ Do not print a header line.--notruncateโ Don't truncate output.-o,--outputlist โ Specify which output columns to print. The default list of columns may be extended if list is specified in the format+list.--output-allโ Output all available columns.--list-columnsto get a list of all supported columns.-H,--list-columnsโ List the columns that can be specified with the--outputoption. Can be used with--jsonor--rawto get the list in a machine-readable format.-p,--pwdโ Display information related to login by password (see also-afL).-r,--rawโ Raw output (no columnation).-J,--jsonโ JSON format output.-s,--system-accsโ Show system accounts. These are by default all accounts with a UID between101and999(inclusive), with the exception of eithernobodyornfsnobody(UID65534). This hardcoded default may be overridden by the parametersSYS_UID_MINandSYS_UID_MAXin the file/etc/login.defs.--time-formattype โ Display dates inshort,fullorisoformat. The default isshort, this time format is designed to be space efficient and human readable.-u,--user-accsโ Show user accounts. These are by default all accounts with a UID above1000(inclusive), with the exception of eithernobodyornfsnobody(UID65534). This hardcoded default may be overridden by the parametersUID_MINandUID_MAXin the file/etc/login.defs.-h,--helpโ Display help text and exit.-V,--versionโ Display version and exit.--wtmp-filepath โ Alternate path forwtmp.--lastlog-filepath โ Alternate path forlastlog(8).-y,--shellโ The column name will be modified to contain only characters allowed for shell variable identifiers. This is usable, for example, with--export. Note that this feature has been automatically enabled for--exportin version 2.37, but due to compatibility issues, now it's necessary to request this behavior by--shell. ๐ซ the drama-Z,--contextโ Display the users' security context.-z,--print0โ Delimit user entries with a nul character, instead of a newline.
๐ EXIT STATUS ๐
0โ if OK,1โ if incorrect arguments specified,2โ if a serious error occurs (e.g., a corrupt log).
๐ NOTES ๐
The default UID thresholds are read from /etc/login.defs.
๐ Password status
Multiple fields describe password status.
- "Password is locked" โ The password is prefixed by
'!!', and the user cannot login although the password is set or empty. This is common for new accounts without a set password. - "Password not required (empty)" โ The password is not set (hash is missing); this is common for locked system accounts. Not requiring a password does not mean the user can log-in without a password. It depends on the password "lock" status.
- "Login by password disabled" โ
'yes'means that there is no valid password. The password hash is missing, or the hash method is unknown or contains invalid chars.
๐ง ENVIRONMENT ๐ง
LIBSMARTCOLS_DEBUG=allโ enables libsmartcols debug output.LIBSMARTCOLS_DEBUG_PADDING=onโ use visible padding characters.LIBSMARTCOLS_JSON=compact|linesโ Controls JSON output format when using--json. Supported values arecompactfor JSON output with minimal whitespace, andlinesfor JSON Lines format (one JSON object per line). If unset or set to any other value, pretty-printed JSON is used.
๐ HISTORY ๐
The lslogins utility is inspired by the logins utility, which first appeared in FreeBSD 4.10. ancestry reveal โจ
๐ AUTHORS ๐
Ondrej Oprala <ooprala@redhat.com>, Karel Zak <kzak@redhat.com>
๐ SEE ALSO ๐
group(5), passwd(5), shadow(5), utmp(5)
๐ REPORTING BUGS ๐
For bug reports, use the issue tracker <https://github.com/util-linux/util-linux/issues>.
๐ AVAILABILITY ๐
The lslogins command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.
and that's the whole page bestie, no cap ๐
this was util-linux 2.42.4, dated 2026-09-21, and it's giving LSLOGINS(1) energy โ go forth and inspect those users ๐ซถ๐ธ
๐ฆ where this page comes from
- arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms