who (Unix)

from Wikipedia, the free encyclopedia

who is a classic command under Unix - operating systems , the list of currently registered on the system user displays. who is specified as a required component in the Single UNIX Specification , along with its expected behavior. The GNU implementation is part of the GNU Core Utilities .

history

Who is one of the historically oldest commands in Unix environments. Since the command dates from before graphical user interfaces , the display on some platforms is incomplete in that it does not take into account X11 virtual terminals such as xterm .

With the standardization through the Single Unix Specification it was determined that who should output at least one list of the logged on users. The XSI extension also provides that data about the user name , the terminal used , the time of login , the process ID of the login shell and the time since the last activity in the terminal ( idle time) should be output.

example

Calling who on a Linux system on which the user bob is logged in on several virtual terminals could look like this:

$ who
bob     pts/1        2008-05-18 00:30 (p57a6d3a7:S.0)
bob     pts/2        2008-07-20 18:18 (p57a6d3a7:S.1)
bob     pts/4        2008-05-18 22:59 (p57a6d3a7:S.3)
bob     pts/3        2008-05-18 00:53 (p57a6d3a7:S.2)
bob     pts/5        2008-07-26 23:20 (p57a6d3a7:S.4)

The first column shows the user name, the second that of the login terminal, the third the login time and after that, in brackets, the host from which the user is connected (via SSH ).

Alternatives

The who command is similar to the Unix command w , which outputs additional data in addition to the information from who , such as: B. the last command executed by each user.

If who is called with the parameters on the i , it outputs the name of the logged in user like the Unix command whoami , but also the terminal name, the time of the login and the computer name from which the login comes.

Web links