
linux ps aux
ps
command is used to get detailed information about the process running on Linux, Unix, and BSD systems. There are some popular options and use cases for ps where one of them is aux options. We will look at this use case in this tutorial. For more detailed ps
tutorial look following.
ps
命令用于获取有关在Linux,Unix和BSD系统上运行的进程的详细信息。 ps有一些流行的选项和用例,其中一个是aux选项。 我们将在本教程中研究这个用例。 有关更详细的ps
教程,请参见以下内容。
Linux ps Command Tutorial List Processes with Examples
a
选项为所有用户显示过程(a
Option Shows Process For All Users)
The default behavior of the ps
command is listing only current user processes. All other users owned processes will be not shown. a
options will print all other user processes too.
ps
命令的默认行为是仅列出当前用户进程。 所有其他用户拥有的进程将不会显示。 a
选项也会打印所有其他用户进程。
$ ps a

We can see that the a
option provides more information about the listed processes. Information like the full path, parameters and stat are listed.
我们可以看到a
选项提供了有关所列过程的更多信息。 列出了诸如完整路径,参数和统计信息之类的信息。
u
选项显示进程所有者 (u
Option Shows Process Owner)
The default behavior about showing process information will not print the owner of the process. But in most cases, the process owner data will very helpful. So we can use u option in order to show the process owner.
关于显示流程信息的默认行为不会打印流程的所有者。 但是在大多数情况下,流程所有者数据将非常有帮助。 因此,我们可以使用u选项来显示进程所有者。
$ ps u

u
Option Shows Process Owner
u
选项显示流程所有者
x
选项显示带有终端信息的过程(x
Option Shows Processes With Terminal Information)
ps
will show only the terminal attached process by default. If we want to show other processes those not attached to the terminal we can use x
option.
ps
默认情况下仅显示终端连接过程。 如果要显示其他未连接到终端的进程,可以使用x
选项。
$ ps x

ps aux显示用户,所有过程和终端信息 (ps aux Shows User, All Processes and Terminal Information)
System administrators generally use all of the previously described options in order to get all details in a single ps command execution. So we can combine all these options like below which will list user, terminal information for all processes currently running on the current system.
系统管理员通常使用所有前面描述的选项,以便在单个ps命令执行中获得所有详细信息。 因此,我们可以像下面这样组合所有这些选项,以列出当前在当前系统上运行的所有进程的用户,终端信息。
$ ps aux

linux ps aux