1、查看所有用户名
cat /etc/passwd |cut -f 1 -d #是1不是L的小写
2、显示用户信息
whoami 查看当前登录用户名。
id username 查看用户的uid,gid和组名。
groups username 查看用户username所在的组及组内成员。
groups 查看当前登录用户所在的组及组内成员。
1、查看所有用户名
cat /etc/passwd |cut -f 1 -d #是1不是L的小写
2、显示用户信息
whoami 查看当前登录用户名。
id username 查看用户的uid,gid和组名。
groups username 查看用户username所在的组及组内成员。
groups 查看当前登录用户所在的组及组内成员。