lslogins
user managementLinux
The lslogins command is one of the most frequently used commands in Linux/Unix-like operating systems. lslogins Display information about user accounts
Quick Reference
Command Name:
lslogins
Category:
user management
Platform:
Linux
Basic Usage:
lslogins [options] [arguments]
Common Use Cases
Syntax
lslogins [options] [username...]
Options
| Option | Description |
|---|---|
-a, --acc-expiration |
Display account expiration information |
-c, --colon-separate |
Display data in colon-separated format |
-e, --export |
Display data in export format |
-f, --failed |
Display information about the last failed login |
-G, --supp-groups |
Display information about supplementary groups |
-g, --groups=groups |
Only show users belonging to the specified groups |
-L, --locks |
Display password lock status |
-l, --logins |
Display login information |
-n, --newline |
Display each piece of information on a new line |
-o, --output list |
Define which output columns to use |
-p, --pwd |
Display password expiration information |
-r, --raw |
Display data in raw format |
-s, --system-accs |
Display system accounts |
-u, --user-accs |
Display user accounts |
-z, --print0 |
Delimit user entries with a null character |
--time-format=type |
Show time in the specified format: short, full, iso |
-h, --help |
Display help information |
-V, --version |
Display version information |
Examples
How to Use These Examples
The examples below show common ways to use the lslogins command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.