LoginSignup
0
0

More than 3 years have passed since last update.

whoコマンドメモ

Last updated at Posted at 2020-09-29

ログインしているユーザー、ログイン時間、接続元などが表示される。

$ who
miisuke     pts/0        2019-07-19 13:32 (gateway.test.jp)

-H をつけた方が項目名がついてわかりやすいかも。

$ who -H
名前     端末         時間             コメント
miisuke     pts/0        2019-07-19 13:32 (gateway.test.jp)

サーバーが起動した時間を表示

$ who -b
         system boot  2014-07-07 14:26

uオプションもつけてみる。

# who -uH
USER     LINE     LOGIN-TIME   IDLE  FROM
number   tty1     Nov 21 01:54  old
number   pts/1    Nov 22 01:16 06:37
hoge     pts/0    Nov 21 16:24   .   (xxx.xxx.xxx.xxx)
number   pts/2    Nov 22 01:29 02:08
hoge     pts/3    Nov 23 03:03 00:06 (xxx.xxx.xxx.xxx)

<IDLE列の表示について>
. が表示されている場合は、ユーザーが1分以内に端末操作を行っているということ。
old が表示された場合、ユーザーが24時間以上端末操作を行っていないということ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0