ONE COMMAND A DAY
April 22, 2009 Leave a comment
The who command displays information about all users currently on the system. The following information is displayed: login name, tty, date and time of login. Typing who am i or who am I displays your login name, tty, date and time you logged in. If the user is logged in from a remote machine, then the host name of that machine is displayed as well.
The who command can also display the elapsed time since line activity occurred, logins, logoffs, restarts, and changes to the system clock, as well as other processes generated by the initialization process.
|-a||Process /var/adm/utmp or the named file with -b, -d, -l, -p, -r, -t, -T, and -u options turned on.|
|-b||Indicate the time and date of the last reboot.|
|-d||Display all processes that have expired and not been respawned by init . The exit field appears for dead processes and contains the termination and exit values (as returned by wait), of the dead process. This can be useful in determining why a process terminated.|
|-H||Output column headings above the regular output.|
|-l||List only those lines on which the system is waiting for someone to login. The name field is LOGIN in such cases. Other fields are the same as for user entries except that the state field does not exist.|
|-m||Output only information about the current terminal.|
|-n x||Take a numeric argument, x, which specifies the number of users to display per line. x must be at least 1. The -n option may only be used with -q.