Finding the process that a window belongs to

Last edited on

On Unix

It is possible to discover which process a window belongs to by using the xprop command line tool (which is part of the Debian package x11-utils).

  1. Execute the following command in a shell:

    xprop _NET_WM_PID | sed 's/_NET_WM_PID(CARDINAL) = //'
  2. Click on the window whose process should be identified. (If the desired window is not visible, use Alt+Tab to bring it to the foreground.) The above command should then output the process ID, for example:

    923
    

To output the parent process ID (PPID), process ID (PID) and the complete command used for executing a process, the following command can be used (in the same way):

ps ww -o ppid=,pid=,cmd= -q `xprop _NET_WM_PID | sed 's/_NET_WM_PID(CARDINAL) = //'`

Example output:

    854    2101 /usr/lib/firefox/firefox https://www.froglogic.com

On Windows

It is possible to discover which process a window belongs to by using the Process Explorer tool.

  1. Start Process Explorer:

  2. Drag and drop the "Find Windows's Process" symbol onto the window whose process should be identified:

    After the drop, Process Explorer selects the process that the window belongs to:

  3. Double click (or right click and choose Properties from context menu) the respective process to show its more of its details: