Linux who command
Linux who command to display the system which users are above data show that contains the user ID, terminal use, even from which side up, on-line time, slack time, CPU usage, action and so on.
Access: All users can use.
grammar
who - [husfV] [user]
Parameter Description:
- -h: Do not show the title bar
- -u: Do not display user action / work
- -s: Use short format displays
- -f: Do not display the user's position on the line
- -V: Display the program version
Examples
Currently logged on user systems
# who //显示当前登录系统的用户 root tty7 2014-05-13 12:12 (:0) root pts/0 2014-05-14 17:09 (:0.0) root pts/1 2014-05-14 18:51 (192.168.1.17) root pts/2 2014-05-14 19:48 (192.168.1.17)
Show title bar
# who -H NAME LINE TIME COMMENT root tty7 2014-05-13 12:12 (:0) root pts/0 2014-05-14 17:09 (:0.0) root pts/1 2014-05-14 18:51 (192.168.1.17) root pts/2 2014-05-14 19:48 (192.168.1.17)
Display User Login sources
# who -l -H NAME LINE TIME IDLE PID COMMENT LOGIN tty4 2014-05-13 12:11 852 id=4 LOGIN tty5 2014-05-13 12:11 855 id=5 LOGIN tty2 2014-05-13 12:11 862 id=2 LOGIN tty3 2014-05-13 12:11 864 id=3 LOGIN tty6 2014-05-13 12:11 867 id=6 LOGIN tty1 2014-05-13 12:11 1021 id=1
Display terminal properties
# who -T -H NAME LINE TIME COMMENT root + tty7 2014-05-13 12:12 (:0) root + pts/0 2014-05-14 17:09 (:0.0) root - pts/1 2014-05-14 18:51 (192.168.1.17) root - pts/2 2014-05-14 19:48 (192.168.1.17)
Show only the current user
# who -m -H NAME LINE TIME COMMENT root pts/1 2014-05-14 18:51 (192.168.1.17)
Lite mode display
# who -q root root root root # users=4