您好,欢迎来到二三四教育网。
搜索
您的当前位置:首页每天一个Linux 命令 - who

每天一个Linux 命令 - who

来源:二三四教育网

who

who - show who is logged on

Print information about users who are currently logged in.
打印当前登录用户的信息.

  • a --all 显示所有的登录信息
          [posp@hadoop02 Kms]$ who -a
                      系统引导     2016-12-11 16:18
                      运行级别 5   2016-12-11 16:18
           登录       tty4         2016-12-11 16:18              1961 id=4
           登录       tty2         2016-12-11 16:18              1956 id=2
           登录       tty3         2016-12-11 16:18              1959 id=3
           登录       tty6         2016-12-11 16:18              1965 id=6
           登录       tty5         2016-12-11 16:18              1963 id=5
           root     + pts/0        2017-02-24 10:10  旧的       15093 
                      pts/1        2017-03-09 01:14              5696 id=ts/1  终端=0 退出=0
                      pts/2        2016-12-13 14:25             11150 id=ts/2  终端=0 退出=0
  • q --count print all login names and number of users logged on
    打印出所有登录用户的name和数量
[posp@hadoop02 Kms]$ who -q
root posp posp posp posp posp posp posp posp posp
# 用户数=10
  • H --heading print line of column headings
    打印出行的头部信息

  • who am i

[posp@hadoop02 log]$ who am i
posp     pts/5        2017-03-08 09:59 (192.168.10.184)

Copyright © 2019- how234.cn 版权所有 赣ICP备2023008801号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务