ArticleDirectory
- Parameters
- Option
- Example
Show logged-on user information
Who [Options]
Who am I
WhoProgramDisplays the information of the user logging on to the local system. This information includes the user name, terminal device, logon time, and the corresponding remote host name (if applicable) of each user)
Parameters
When two parameters are given(Am I),WhoDisplays information about the user who runs the command.
Option
-A: show more information.
-B: displays the last start date and time of the system.
-H: Display title
-L list devices waiting for User Login
-Q: only list the user names, and the number of users subsequently logged on to the system
-T append a character to each user name to indicate whether the user has enabled the message. + indicates that the message has been disabled ,? The device cannot be found.
If the message is enabled, you can use write to communicate with the user.
Example Who
$WhoSiu tty82013-01-14 11:36(:0) Siu PTS/02013-01-14 11:37(:0)
Displays the user information of the current logon system.
Who-H
$Who-H Name line time remarks Siu tty82013-01-14 11:36(:0) Siu PTS/02013-01-14 11:37(:0)
Add the title to display the user information of the current logon System
Who am I
$WhoAm isiu PTS/02013-01-14 11:37(:0)
Displays the user information of the command.