who

打印当前登录的用户

语法

  who [options] [file] [am i]

选项



   -m
     打印当前用户ID,名称和域
     ( `who 同 i' 一样)

   -q
   --count
     仅打印登录名和登录用户数。
     覆盖所有其他选项。

   -s
     忽略

   -i
   -u
   --idle
       在登录时间之后,打印用户空闲的小时和分钟数.
        `.'表示用户最后一次处于活动状态分钟
       “old”表示用户空闲时间超过24小时。

   -l
   --lookup
     尝试通过DNS规范化在utmp中找到的主机名
     抬头。这不是默认值,因为它可能会导致严重问题
     延迟使用自动拨号上网的系统。

   -H
   --heading
     打印一行列标题。

   -w
   -T
   --mesg
   --message
   --writable
       在每个登录名之后打印一个表示用户消息状态的字符:

          +  允许“写”消息
          -  禁止“写”消息
          ?  找不到终端设备

who命令与whoami的不同之处在于它提供了当前登录系统的所有用户的列表以及有关每个用户的其他信息(包括登录时间和终端号)。它的不同之处还在于,如果通过使用su命令更改登录会话的所有权,它会报告会话的原始所有者,而whoami会提供有效(即当前)所有者的用户名会话.

如果没有给出非选项参数,则“who”为当前登录的每个用户打印以下信息:

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

who 命令实例:

linux命令:whois cmd.fu;whois cmdfu.com|grep -i cmdfu cmdfu -i cmdfu.com|grep cmd.fu;whois whois whois cmd.fu;whois cmdfu.com|grep -i cmdfurootopen.com
linux命令:whois cmd.fu;whois cmdfu.com|grep -i cmdfu cmdfu -i cmdfu.com|grep cmd.fu;whois whois whois cmd.fu;whois cmdfu.com|grep -i cmdfurootopen.com
2018-05-28 20:24:48

linux命令:who am i i am who who am irootopen.com
linux命令:who am i i am who who am irootopen.com
2018-03-30 00:07:48

linux命令:who -b -b who who -brootopen.com
linux命令:who -b -b who who -brootopen.com
2018-02-20 00:02:48

linux命令:whois domainnametocheck.com | grep match match grep | domainnametocheck.com whois whois domainnametocheck.com | grep matchrootopen.com
linux命令:whois domainnametocheck.com | grep match match grep | domainnametocheck.com whois whois domainnametocheck.com | grep matchrootopen.com
2018-04-07 20:43:48

linux命令:who -r -r who who -rrootopen.com
linux命令:who -r -r who who -rrootopen.com
2018-02-21 05:09:48

linux命令:who loves mum mum loves who who loves mumrootopen.com
linux命令:who loves mum mum loves who who loves mumrootopen.com
2018-03-15 19:00:48

linux命令:who -u | grep -vE "^root " | kill `awk '{print $6}'` $6}'` '{print `awk kill | " "^root -vE grep | -u who who -u | grep -vE "^root " | kill `awk '{print $6}'`rootopen.com
linux命令:who -u | grep -vE "^root " | kill `awk '{print $6}'` $6}'` '{print `awk kill | " "^root -vE grep | -u who who -u | grep -vE "^root " | kill `awk '{print $6}'`rootopen.com
2017-12-29 11:43:48

linux命令:who -u|grep -v root|awk {'print $6'}|kill `awk {'print $0'}` $0'}` {'print `awk $6'}|kill {'print root|awk -v -u|grep who who -u|grep -v root|awk {'print $6'}|kill `awk {'print $0'}`rootopen.com
linux命令:who -u|grep -v root|awk {'print $6'}|kill `awk {'print $0'}` $0'}` {'print `awk $6'}|kill {'print root|awk -v -u|grep who who -u|grep -v root|awk {'print $6'}|kill `awk {'print $0'}`rootopen.com
2018-05-14 07:25:48

linux命令:who -u | grep -vE "^root " | kill `awk '{print $7}'` $7}'` '{print `awk kill | " "^root -vE grep | -u who who -u | grep -vE "^root " | kill `awk '{print $7}'`rootopen.com
linux命令:who -u | grep -vE "^root " | kill `awk '{print $7}'` $7}'` '{print `awk kill | " "^root -vE grep | -u who who -u | grep -vE "^root " | kill `awk '{print $7}'`rootopen.com
2018-06-11 07:50:48

linux命令:whois -H $(cat ./list_of_domains) | awk 'BEGIN{RS=""}/Registrant/,/Registration Service Provider:/ {print} END{print "----------------\n"}' "----------------\n"}' END{print {print} Provider:/ Service 'BEGIN{RS=""}/Registrant/,/Registration awk | ./list_of_domains) $(cat -H whois whois -H $(cat ./list_of_domains) | awk 'BEGIN{RS=""}/Registrant/,/Registration Service Provider:/ {print} END{print "----------------\n"}'rootopen.com
linux命令:whois -H $(cat ./list_of_domains) | awk 'BEGIN{RS=""}/Registrant/,/Registration Service Provider:/ {print} END{print "----------------\n"}' "----------------\n"}' END{print {print} Provider:/ Service 'BEGIN{RS=""}/Registrant/,/Registration awk | ./list_of_domains) $(cat -H whois whois -H $(cat ./list_of_domains) | awk 'BEGIN{RS=""}/Registrant/,/Registration Service Provider:/ {print} END{print "----------------\n"}'rootopen.com
2018-04-30 03:26:48

linux命令:who;ps aux|grep ssh ssh aux|grep who;ps who;ps aux|grep sshrootopen.com
linux命令:who;ps aux|grep ssh ssh aux|grep who;ps who;ps aux|grep sshrootopen.com
2018-05-07 01:40:48

linux命令:whowatch whowatch whowatchrootopen.com
linux命令:whowatch whowatch whowatchrootopen.com
2018-01-01 22:40:48

linux命令:who -m | sed 's/.*(\(.*\)).*/\1/' 's/.*(\(.*\)).*/\1/' sed | -m who who -m | sed 's/.*(\(.*\)).*/\1/'rootopen.com
linux命令:who -m | sed 's/.*(\(.*\)).*/\1/' 's/.*(\(.*\)).*/\1/' sed | -m who who -m | sed 's/.*(\(.*\)).*/\1/'rootopen.com
2018-02-25 16:26:48

linux命令:who am i i am who who am irootopen.com
linux命令:who am i i am who who am irootopen.com
2018-04-27 19:25:48

linux命令:who am i | wc -l -l wc | i am who who am i | wc -lrootopen.com
linux命令:who am i | wc -l -l wc | i am who who am i | wc -lrootopen.com
2018-05-12 05:53:48

Linux的Bash命令行(A-Z排序)