• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

lslogins Command Examples in Linux

by Deepika

lslogins is a Linux command that provides information about the users on a system. It displays a list of users along with details such as the user ID (UID), group ID (GID), real name (GECOS), home directory, and shell. This information is gathered from various sources such as /etc/passwd, /etc/group, and other system-specific user information databases.

The output of lslogins can be useful in various scenarios, such as when you need to identify a specific user on the system, check the details of a user account, or get an overview of all the users on the system. The command can be used with different options to customize the information displayed and filter the output based on specific criteria.

lslogins Command Examples

1. Display users in the system:

# lslogins

2. Display users belonging to a specific group:

# lslogins --groups=groups

3. Display user accounts:

# lslogins --user-accs

4. Display last logins:

# lslogins --last

5. Display system accounts:

# lslogins --system-accs

6. Display supplementary groups:

# lslogins --supp-groups

Filed Under: Linux

Some more articles you might also be interested in …

  1. nc: command not found
  2. firewall-offline-cmd Command Examples in Linux
  3. How To Configure Separate Override.conf For Multiple MySQL Instances Using Systemd
  4. What is the purpose of utmp, wtmp and btmp files in Linux
  5. Oracle Software Group Accounts OSDBA, OSOPER, Oracle Inventory group
  6. a2dissite Command Examples in Linux
  7. CentOS / RHEL : How to rotate /var/log/wtmp and /var/log/btmp file using logrotate
  8. How To Create a Partition Using “parted” Command
  9. zypper: command not found
  10. kdocker: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright