linux - Unix 命令 |附注

标签 linux shell unix

我在 Shell 提示符下发出以下命令: $ps-u 0

我无法理解其输出是什么。谁能详细说明一下吗?

最佳答案

从 man ps 复制:

   -u userlist     Select by effective user ID (EUID) or name.
                   This selects the processes whose effective user name or ID is in userlist. The
                   effective user ID describes the user whose file access permissions are used by the
                   process (see geteuid(2)). Identical to U and --user.

含义: 它打印所有以用户 0 (root) 启动的进程
请参阅 man ps 了解更多信息

编辑: 要查看所有正在运行的进程,而不仅仅是某个用户的进程,您可以使用“ps ax”

关于linux - Unix 命令 |附注,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14549139/

相关文章:

c++ - 使用 C++ 进行目录导航

linux - 如何创建能够让我查看、修改和附加它创建的文本文件的 Shell 脚本

python - Ubuntu 16.10 : Need help installing python3-bsddb3

shell - 将环境变量传递给多个命令

c - GNU getopt() 的 -W 选项有什么用?

linux - *unix 上的 LD_LIBRARY_PATH 变量中的 LD 代表什么?

c - 基于 Unix 的 shell 在退出时关于子进程的默认行为?

shell - 删除重复行而不排序

linux - 从 Shell 脚本运行 Postgres 命令

python - "python"virtualenv activate后仍然运行系统版本