linux pts,CommandLine · vlachoudis/bCNC Wiki · GitHub

The pts/0 is telling you which "pseudo terminal" the user is logged in on. In this case it's terminal #0. The "(:0.0)" tells you which hostname and display you're using.

who am i is an alias of command who -m. See the man page for who. You can also read about the who command here.

The output can definitely be confusing to a Unix novice.

examplesshows -m is same as am i[root@grinch]$ who am iroot pts/42013-04-12 07:10 (greeneggs.mydom.net)[root@grinch]$ who -mroot pts/42013-04-12 07:10 (greeneggs.mydom.net)connected to some remote system[sam@munger ~]$ who am isampts/02013-04-12 07:19 (192.168.1.7)locally on my laptop[saml@greeneggs ~]$ who am isaml pts/12013-04-11 16:41 (:0.0)

The last bit that still might be confusing you is the :0.0. This is how X Windows represents the "display" a user is on. The first "0" says which monitor/device you're on, the second "0" says which virtual display you're on.

This harks back to the days when computers were expensive and so multiple people might be working on the same computer all at the same time. I wouldn't worry about it, just remember that it's either going to be ":0.0" or possibly ":0". The environment variable "DISPLAY" and the command xhost make use of the ":0.0" value.

You can read more about remote displaying in Unix here.

whoami vs. who am i

Aren't they the same command? No they're different:

[saml@grinchy ~]$ ls -l /usr/bin/who /usr/bin/whoami-rwxr-xr-x 1 root root 49432 Nov32010 /usr/bin/who-rwxr-xr-x 1 root root 26280 Nov32010 /usr/bin/whoami

Also their output is completely different; whoami just shows you your effective userid while who am i shows you connection info about your terminal:

[saml@grinchy ~]$ who am isaml pts/02013-04-11 16:41 (:0.0)[saml@grinchy ~]$ whoamisaml

See the whoami man page here.

linux 查看ptslinux 切换 ptslinux pstlinux devptslinux tty命令python ptsubuntu pts虚拟ttylinux pts多英雄无敌3炮术受箭术的加成腹肌真实照片不带脸学生扁桃体发炎早期症状有哪些金志文好听的歌曲三十首古代战争军事论坛电影剧组一般多少人四年级上册英语图画怎么读好看的日本爱情剧推荐realme和iqoo哪个适合学生同ip域名查询工具真心话大冒险的规则图QQ