English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Linux who命令用于显示系统中有哪些用户正在使用,显示的信息包括用户ID、使用的终端、连接来源、登录时间、停留时间、CPU使用量、操作等。
使用权限:所有用户都可以使用。
qui - [husfV] [user]
说明参数:
display user logged in current system
# who //display user logged in current system 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 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 source login user
# 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 attribute terminal
# 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)
display only current user
# who -m -H NAME LINE TIME COMMENT root pts/1 2014-05-14 18:51 (192.168.1.17)
display mode simplified
# who -q root root root root # users=4