Ubuntu 查询用户账号

查看当前登录

who

users

查看系统中所有用户:

grep bash /etc/passwd

XXXX-VirtualBox:~/桌面$ w
 13:23:26 up 15 min,  1 user,  load average: 0.01, 0.35, 0.34
USER     TTY      来自           LOGIN@   IDLE   JCPU   PCPU WHAT
kevin    :0       :0               13:16   ?xdm?  47.51s  0.01s /usr/lib/gdm3/g
XXXX-VirtualBox:~/桌面$ who
kevin    :0           2021-08-05 13:16 (:0)
XXXX-VirtualBox:~/桌面$ users
kevin
XXXX-VirtualBox:~/桌面$ grep bash /etc/passwd
root:x:0:0:root:/root:/bin/bash
kevin:x:1000:1000:kevin,,,:/home/kevin:/bin/bash

查看所有用户

cat /etc/passed

 

posted @ 2021-08-05 13:29  VTech_kevin  阅读(1130)  评论(0编辑  收藏  举报