who command
Command who is currently logged in user information display system. Who can execute commands that there are users who log into the system, the individual who executed the command will list any user account, use the terminal, login time, and where to sign or display which X is being used.
grammar
the WHO (option) (parameters)
Options
-H or - heading: display the title of each field information sequence; -i or -u or --idle: idle time display, if the user has any previous operation within one minute, will be marked as " . " number, if the user has more than 24 hours without any action, then mark the " Old " string; -m: effect of this parameter is specified and " AM I " the same character string; -q or - COUNT: displays logged account name and the total number; - S: this argument ignores not be processed, who only responsible for resolving compatibility issues instructions to other versions; -w or -T or --mesg or --message or - Writable: user display information status bar; - help: online help; --version: show the version information.
parameter
File: specify the query file.
Examples
[root@localhost ~]# who root pts/0 2013-08-19 15:04 (192.168.0.134) root pts/1 2013-12-20 10:37 (180.111.155.40) [root@localhost ~]# who -q root root # users=2 [root@localhost ~]# who -H NAME LINE time COMMENT root pts/0 2013-08-19 15:04 (192.168.0.134) root pts/1 2013-12-20 10:37 (180.111.155.40) [root@localhost ~]# who -w root + pts/0 2013-08-19 15:04 (192.168.0.134) root + pts/1 2013-12-20 10:37 (180.111.155.40)