列出所有没有systen用户的Linux用户 [英] List all Linux users without systen users
本文介绍了列出所有没有systen用户的Linux用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想列出Linux中的所有用户而不显示systen-user。
如何仅使用用户名。
I would like to list all users in Linux without showing systen-user. How can I make this only the username .
例如 cut -d:-f1 / etc / passwd
,我可以看到所有用户+系统用户。
For example cut -d: -f1 /etc/passwd
, I can see all users + system users.
推荐答案
这将显示所有uid小于999的用户:
This shows all users with uid less than 999:
awk -F':' '$3>999 {print $1 " uid: " $3}' /etc/passwd | column -t | grep -v nobody
编辑:
使用 cut
仅显示人类用户:
cut -d: -f1,3 /etc/passwd | egrep ':[0-9]{4}$' | cut -d: -f1
这篇关于列出所有没有systen用户的Linux用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文