
who | 511
Linux
Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
-v, -V, --version
Print version information and then exit.
--help
Print help information and then exit.
Example
$ which cc ls
/usr/bin/cc
ls: aliased to ls -sFC
who
who [options] [file]
who am i
Show who is logged into the system. With no options, list the
names of users currently logged in, their terminal, the time they
have been logged in, and the name of the host from which they
have logged in. An optional system file (default is /etc/utmp) can be
supplied to give additional information.
Options
-a, --all
Equivalent to -b -d --login -p -r -t -T -u.
am i
Print the username of the invoking user.
-b, --boot
Print time of last system boot.
-d, --dead
Print a list of dead processes.
--help
Print a help message and then exit.
-i, --idle
Include idle times. An idle time of
. indicates activity within
the last minute; one of old indicates no activity in more than a
day.
-l, --login
Print list of system login processes.
--lookup
Attempt to include canonical hostnames via DNS.
-m Same as who am i.
-p, --process
Print active processes spawned by init.
-q, --count
“Quick.” Display only the usernames and total number of
users.
-r, --runlevel
Print the current runlevel.
-s, --short
Print only name, line, and time. This is the default behaviour.