English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Linux who command is used to display which users are currently logged in to the system, and the displayed information includes user ID, terminal used, from where connected, login time, idle time, CPU usage, actions, etc.
Access Permission: All users can use it.
who - [husfV] [user]
Parameter Description:
Display the current user logged into the system
# who //Display the current user logged into the 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 User Login Source
# 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 Attributes
# 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)
Only display the current user
# who -m -H NAME LINE TIME COMMENT root pts/1 2014-05-14 18:51 (192.168.1.17)
Display in Minimal Mode
# who -q root root root root # users=4