Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.15 KB

commandLinux.md

File metadata and controls

40 lines (27 loc) · 1.15 KB

Details and Login Details in Linux

  1. id Command – Show User and Group IDs. eg: $id username

  2. groups Command – View User Group Memberships. eg: $groups username

  3. finger Command – Show User Information. eg: $finger username

  4. getent Command – Fetch User Info from System Database. eg: $getent passwd username

  5. grep Command – Search for Patterns or Specific Text in Files. eg: $grep username /etc/passwd

  6. lslogins Command – Display User Information in Linux. eg: $lslogins -u

  7. users Command – List Current Logged-In Users on Linux. eg: $users

  8. who Command – Show Information Of Currently Logged-In Users. eg: $who -u

  9. w Command – Show Currently Logged-In User Activity. eg: $w

  10. last Command – Show Most Recent Login Session. eg: $last- This will display the list of the most current login sessions, data of the users who have signed in, their login time, and which terminals or remote hosts they used.

OR

$last -ap now - This will display the list of users who are logged in now.

  1. lastb Command – Show Failed Login Attempts. eg: $lastb

  2. lastlog Command – List User Login Information. eg: $lastlog OR $lastlog -u username