Linux 下 who 命令

命令:

  who:

常用选项意义
-a显示所有用户的所有信息
-m显示运行该程序的用户
-p只显示用户的登陆帐号和登陆用户的数量,该选项优先级高于其他任何选项
-r显示当前用户的运行级别,是在那个级别运行的
-u在登陆用户后面显示该用户最后一次对系统进行操作距今的时间

  

 

 

 

 

参数:注:格式有点乱,

  -a, --all :

    系统引导 2014-05-30 00:32

    运行级别 2 2014-05-30 00:32

    登录 tty4 2014-05-30 00:32 932 id=4
    登录 tty5 2014-05-30 00:32 937 id=5
    登录 tty2 2014-05-30 00:32 944 id=2
    登录 tty3 2014-05-30 00:32 945 id=3
    登录 tty6 2014-05-30 00:32 947 id=6
    登录 tty1 2014-05-30 00:32 1182 id=1
    yufangqing + tty7 2014-05-30 00:33 旧 2320
    yufangqing - pts/0 2014-05-30 00:33 . 3168 (:0)

  -b, --boot :
    time of last system boot

    系统最后一次启动的时间

  -d, --dead :
    print dead processes

    打印已经被死亡的进程

  -H, --heading:

    print line of column headings

事例:  名称 线路 时间 备注

    yufangqing tty7 2014-05-30 00:33
    yufangqing pts/0 2014-05-30 00:33 (:0)

  --ips

    print ips instead of hostnames. with --lookup, canonicalizes
    based on stored IP, if available, rather than stored hostname

  -l, --login
    print system login processes

    打印当前系统登陆进程

  --lookup
    attempt to canonicalize hostnames via DNS

  -m

     only hostname and user associated with stdin

  -p, --process
    print active processes spawned by init

  

  -q, --count
    all login names and number of users logged on

  -r, --runlevel
    print current runlevel

  -s, --short
    print only name, line, and time (default)

  -t, --time
    print last system clock change

  -T, -w, --mesg
    add user's message status as +, - or ?

  -u, --users
    list users logged in

  

转载于:https://www.cnblogs.com/yufangqing/p/3760371.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值