laz*_*rus 11 command-line tty who
在阅读 Linux 时,我得到了一个$ who -a
,所以在尝试之前我分别登录了我的三个文本终端(tty1,tty2,tty3)
,然后我回到了X-window
(Ctrl + Alt +f7),然后我尝试了:-
$ who
anupam tty2 2014-09-20 16:19
anupam tty3 2014-09-20 16:20
anupam tty1 2014-09-20 16:18
anupam :0 2014-09-20 16:14 (:0)
anupam pts/0 2014-09-20 16:21 (:0)
$ whoami
anupam
$ who -a
system boot 2014-09-20 16:13
run-level 2 2014-09-20 16:13
LOGIN tty4 2014-09-20 16:13 736 id=4
LOGIN tty5 2014-09-20 16:13 740 id=5
anupam - tty2 2014-09-20 16:19 00:01 3200
anupam - tty3 2014-09-20 16:20 . 3346
LOGIN tty6 2014-09-20 16:13 752 id=6
anupam - tty1 2014-09-20 16:18 00:02 3044
anupam ? :0 2014-09-20 16:14 ? 1835 (:0)
anupam + pts/0 2014-09-20 16:21 . 3455 (:0)
$
Run Code Online (Sandbox Code Playgroud)
我没有得到一些术语second attribute
(- tty2,-tty 3,-tty1
我 [为什么-
在它们前面?])?:0
(我想它表示我的X-window
启动 [为什么有一个?
之前:0
?]),以及第四个属性的值[00:01, ., 00:02, ?, .]?
我试着看$ man who -a
,但我没有得到这些解释。
Syl*_*eau 15
pts/0
是一个伪终端从站(参见w 输出中的“pts/”是什么意思?)。
该(:0)
告诉你正在使用的显示器。
在+,-,?
告诉你一个用户/ TTY是否接受邮件。如果为 true,+
则为每个用户显示一个if mesg y
、一个-
ifmesg n
或一个?
if 他们的 tty 不能被统计。
请参阅mesg
手册页:
Run Code Online (Sandbox Code Playgroud)NAME mesg - control write access to your terminal SYNOPSIS mesg [y|n] DESCRIPTION Mesg controls the access to your terminal by others. It's typically used to allow or disallow other users to write to your terminal (see write(1)). OPTIONS y Allow write access to your terminal. n Disallow write access to your terminal. If no option is given, mesg prints out the current access state of your terminal.
资料来源:who.c