其他分享
首页 > 其他分享> > id、groups、finger、w、whoami、who

id、groups、finger、w、whoami、who

作者:互联网

查询命令—id、groups、finger、w、whoami、who
1、id命令—查询用户身份标识
[root@localhost ~]# id amber
uid=503(amber) gid=503(amber) 组=503(amber)
[root@localhost ~]# id
uid=0(root) gid=0(root) 组=0(root) 环境=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
2、groups 命令—查询客户所属的组
[root@localhost ~]# groups amber
amber : amber
[root@localhost ~]# groups
Root
3、finger 命令—查询账号的详细信息
[root@localhost ~]# finger amber
Login: amber Name:
Directory: /home/amber Shell: /bin/bash
Never logged in.
No mail.
No Plan.
4、w 命令—查询已登录到主机的用户信息
[root@localhost ~]# w
62olumn window is too narrow
5、whoami 命令—查询当前登录的账号名
[root@localhost ~]# whoami
root
6、who-
[root@localhost ~]# who
root tty1 2019-03-13 12:20 (:0)
root pts/1 2019-03-13 12:38 (172.16.22.212)

标签:amber,who,id,groups,查询,root,whoami,localhost
来源: https://blog.csdn.net/weixin_44683855/article/details/98734165