who command

LINUX-Frequently used commands

who command View the status of logged in users.
Syntax
who   [Option] 
It shows your login name, the device you are using, the time you logged in and the IP address of the device you are logged in on.
IP addresses do not appear in the results of a who command run from your own computer.
The terminal you are using will be displayed as pts1 or tty1 (where 1 is a number automatically assigned by the computer).
For example, you may be using terminal software to access one computer from several computers.
Each new access increases the pts or tty.
Indicates the number of pts or ttys currently assigned..
Frequently used options
-uDisplays the idle time.
-TIndicates whether it is possible to send a message with the “write” command. (+ possible, – not possible)
-iDisplays the idle time.
-HThe name of the item of information is displayed on the first line of the processing result.
-pOnly processes spawned by an active ‘init’ command will be displayed.
-qDisplay only the names and number of users currently logged in.
-bDisplays the latest system boot time information.
-dDisplay only terminated processes.
-wIndicates whether or not the message was received by “write”. (+receivable, -receivable not)
-rOnly the current run level is shown.
-tDisplays the latest system clock change time information.
-aIt shows the latest start time, terminated “processes”, “logged in processes”, “init generated processes”, “run levels”, “latest system clock change time” and “logged in users”.
-sDisplays user name, device used and connection time. (Used by default)
-mDisplay your own information.
Example: Display the list of logged in users.
$  who
root pts/1 Aug21 00:29
root pts/1 Aug 21 00:29 (:1.0)
koro pts/3 Aug 21 00:30
koro pts/4 Jun 3 15:30 (192.168.11.100)
koro pts/5 Jun 3 15:37 (192.168.11.100)
panser pts/6 Jun 3 17:50 (192.168.11.102)
Example: Display your own information.
$ who am i
koro pts/5 Jun 3 15:37 (192.168.11.100)
タイトルとURLをコピーしました