Linux Commands: Print who is currently logged in


who-Linux Command

who

Print who is currently logged in

SYNTAX
      who [options] [file] [am i]

OPTIONS

`-m'
     Print the current user id, name and domain
     (Same as `who am i')

`-q'
`--count'
     Print only the login names and the number of users logged on.
     Overrides all other options.

`-s'
     Ignored; for compatibility with other versions of `who'.

`-i'
`-u'
`--idle'
     After the login time, print the number of hours and minutes that
     the user has been idle.  `.' means the user was active in last
     minute.  `old' means the user was idle for more than 24 hours.

`-l'
`--lookup'
     Attempt to canonicalize hostnames found in utmp through a DNS
     lookup.  This is not the default because it can cause significant
     delays on systems with automatic dial-up internet access.

`-H'
`--heading'
     Print a line of column headings.

`-w'
`-T'
`--mesg'
`--message'
`--writable'
     After each login name print a character indicating the user's
     message status:

          `+' allowing `write' messages
          `-' disallowing `write' messages
          `?' cannot find terminal device

If given no non-option arguments, `who' prints the following information for each user currently logged on:

login name,
terminal line,
login time,
remote hostname or X display.

If given one non-option argument, `who' uses that instead of `/var/run/utmp' as the name of the file containing the record of users logged on. `/var/run/wtmp' is commonly given as an argument to `who' to look at who has previously logged on.

If given two non-option arguments, `who' prints only the entry for the user running it (determined from its standard input), preceded by the hostname. Traditionally, the two arguments given are `am i', as in `who am i'.

Related Linux Bash commands:

groups - Print group names a user is in
hostname - Print or set system name
id - Print user and group id's
uname - Print system information
logname - Print current login name
users - Print login names of users currently logged in
whoami - Print the current user id and name (`id -un')

Other Linux Commands:
alias , break , builtin , cal , case , cat , cd , cfdisk , chgrp , chmod , chown , chroot , cksum , cmp , comm , command , continue , cp , cron , crontab , csplit , cut , date , dc , dd , declare , df , diff , diff3 , dir , dircolors , dirname , dirs , du , echo , egrep , enable , env , eval , exec , expand , export , expr , factor , false , fdformat , fdisk , fgrep , find , fmt , fold , for , fsck , function , getopts , hash , hashcharacter , head , history , hostname , id , if , import , install , join , kill , less , let , ln , local , locate , logname , logout , lpc , lpr , lprm , ls , m4 , man , mbadblocks , mkdir , mkfifo , mknod , more , mount , mtools , mv , nice , nl , nohup , passwd , paste , period , popd , pr , printf , ps , pushd , pwd , quota , quotacheck , quotactl , ram , rcp , read , readonly , return , rm , rmdir , rsync , sdiff , sed , select , seq , set , shift , shopt , shutdown , sleep , sort , split , su , sum , symlink , sync , tac , tail , tar , tee , test , time , times , top , touch , tr , traceroute , true , tsort , tty , type , ulimit , umask , uname , unexpand , uniq , units , unset , unshar , until , useradd , usermod , users , uuencode , watch , wc , whereis , which , while , who , xargs , yes ,
Live2Support.com :
Product - Benefits - Features - How Does it Works - Pricing - SSL Certificates - Signup - Contactus - Login - Submit Resources