- The who command reports information about the current users:
slynux pts/0 2010-09-29 05:24 (slynuxs-macbook-pro.local)
slynux tty7 2010-09-29 07:08 (:0)
This output lists the login name, the TTY used by the users, login time, and remote hostname (or X display information) about logged in users.
TTY (the term comes from TeleTYpewriter) is the device file associated with a text terminal that is created in /dev when a terminal is newly spawned by the user (for example, /dev/pts/3). The device path for the current terminal can be found out by executing the tty command.
- The w command provides more detailed information:
07:09:05 up 1:45, 2 users, load average: 0.12, 0.06, 0.02
USER TTY FROM LOGIN@ IDLE JCPU ...
Get Linux Shell Scripting Cookbook - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.