OS Manuals

/usr/bin/lslogins

Login utils from util-linux package newgrp last lastb login lslogins nologin sulogin

From util-linux-login 2.42.4-r2 (os), captured 2026-11-05 by running lslogins --help (exit 0). permalink

Usage:
 lslogins [options] [<username>]

Display information about known users in the system.

Options:
 -a, --acc-expiration     display info about passwords expiration
 -c, --colon-separate     display data in a format similar to /etc/passwd
 -e, --export             display in an export-able output format
 -f, --failed             display data about the users' last failed logins
 -G, --supp-groups        display information about groups
 -g, --groups=<groups>    display users belonging to a group in <groups>
 -L, --last               show info about the users' last login sessions
 -l, --logins=<logins>    display only users from <logins>
 -n, --newline            display each piece of information on a new line
     --noheadings         don't print headings
     --notruncate         don't truncate output
 -o, --output[=<list>]    define the columns to output
     --output-all         output all columns
 -p, --pwd                display information related to login by password
 -r, --raw                display in raw mode
 -J, --json               display in JSON format mode
 -s, --system-accs        display system accounts
     --time-format=<type> display dates in short, full or iso format
 -u, --user-accs          display user accounts
 -y, --shell              use column names to be usable as shell variable identifiers
 -Z, --context            display SELinux contexts
 -z, --print0             delimit user entries with a nul character
     --wtmp-file <path>   set an alternate path for wtmp
     --btmp-file <path>   set an alternate path for btmp
     --lastlog-file <path>
                          set an alternate path for lastlog
     --lastlog2-file <path>
                          set an alternate path for lastlog2

 -H, --list-columns       list the available columns
 -h, --help               display this help
 -V, --version            display version

For more details see lslogins(1).
Options (29)
OptionDescriptionSource
-a, --acc-expirationDisplay data about the date of last password change and the account expiration date (see shadow(5) for more info).help + man
-c, --colon-separateSeparate info about each user with a colon instead of a newline.help + man
-e, --exportOutput data in the format of NAME=VALUE.help + man
-f, --failedDisplay data about the users' last failed login attempts.help + man
-G, --supp-groupsShow information about supplementary groups.help + man
-g, --groups groupsdisplay users belonging to a group in <groups>help + man
-L, --lastDisplay data containing information about the users' last login sessions.help + man
-l, --logins loginsOnly show data of users with a login specified in logins (user names or user IDs).help + man
-n, --newlineDisplay each piece of information on a separate line.help + man
--noheadingsDo not print a header line.help + man
--notruncateDon’t truncate output.help + man
-o, --output listSpecify which output columns to print.help + man
--output-allOutput all available columns.help + man
-p, --pwdDisplay information related to login by password (see also -afL).help + man
-r, --rawRaw output (no columnation).help + man
-J, --jsondisplay in JSON format modehelp + man
-s, --system-accsdisplay system accountshelp + man
-u, --user-accsdisplay user accountshelp + man
-y, --shellThe column name will be modified to contain only characters allowed for shell variable identifiers.help + man
-Z, --contextDisplay the users' security context.help + man
-z, --print0Delimit user entries with a nul character, instead of a newline.help + man
--wtmp-file pathset an alternate path for wtmphelp + man
--btmp-file pathset an alternate path for btmphelp + man
--lastlog-file pathset an alternate path for lastloghelp + man
--lastlog2-file pathset an alternate path for lastlog2help
-H, --list-columnsList the columns that can be specified with the --output option.help + man
-h, --helpDisplay help text and exit.help + man
-V, --versionDisplay version and exit.help + man
--time-format typeDisplay dates in short, full or iso format. (in the manual page but not in --help)man
Exit status (3) from the manual page
0if OK,
1if incorrect arguments specified,
2if a serious error occurs (e.g., a corrupt log).

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.