How to use `who` command?

QuestionsQuestions8 SkillsProUser Account ManagementAug, 07 2025
0189

The who command is used to display information about users who are currently logged into the system. Here are some common usages of the who command:

  1. Basic Usage:
    Simply type who in the terminal to see a list of logged-in users:

    who
  2. Detailed Information:
    To get more detailed information, you can use the -a option:

    who -a
  3. Show User Login Time:
    To display the login time of each user, you can use:

    who -u
  4. Show Users Logged in from a Specific Terminal:
    You can specify a terminal to see users logged in from that terminal:

    who pts/0
  5. Combine with Other Commands:
    You can also combine who with other commands using pipes. For example, to count the number of logged-in users:

    who | wc -l

These commands will help you effectively use the who command to monitor user logins on your Linux system.

0 Comments

no data
Be the first to share your comment!