如何在 Linux 上获取当前用户的 UID
运行
id-commands.sh
id -u以获取当前用户的 UID。示例:
id-commands.sh
$ id -u
1000你也可以获取其他用户的 UID:
id-commands.sh
$ id -u root
0Check out similar posts by category:
Linux
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow