who Linux Commands

What is Linux who Command?

Explanation

who COMMAND:

who command can list the names of users currently logged in, their terminal, the time they have been logged in, and the name of the host from which they have logged in.

SYNTAX :


who [options] [file]

OPTIONS:


am i Print the username of the invoking user, The 'am' and 'i' must be space separated.
-b Prints time of last system boot.
-d print dead processes.
-H Print column headings above the output.
-i Include idle time as HOURS:MINUTES. An idle time of . indicates activity within the last minute.
-m Same as who am i.
-q Prints only the usernames and the user count/total no of users logged in.
-T,-w Include user's message status in the output.

EXAMPLE:


  1. who-uH
    Output:
    NAME
    LINE
    TIME
    IDLE
    PID COMMENT hiox
    ttyp3
    Jul 10 11:08
    .
    4578

    This sample output was produced at 11 a.m. The "." indiacates activity within the last minute.
  2. who am i

  3. who am i command prints the user name.

Ask Questions

Ask Question