linux,获取第一个非系统用户id的命令

hl0*_*37_ 1 linux userid

是否有一个linux命令可以获取第一个非系统用户ID(系统上的第一个“真实”用户)?(排除 root 因为https://superuser.com/questions/626843/does-the-root-account-always-have-uid-gid-0

Jon*_*han 5

假设你的意思是“useradd 命令添加的第一个用户的 uid 是什么”——通常是 1000(不过不知道我是怎么知道的)

另外,通过快速谷歌搜索我发现:https ://serverfault.com/questions/362943/who-is-user-500

原来第一个用户是500,现在变成了1000

cat /etc/login.defs | grep UID_MIN
Run Code Online (Sandbox Code Playgroud)

将为您提供系统的最小用户 ID