How to get a specific PID #

Ralf Mardorf silver.bullet at zoho.com
Wed Dec 30 00:08:17 UTC 2015


On Tue, 29 Dec 2015 14:43:02 -0800, rikona wrote:
>How can I find out which PID # is associated with a particular
>instance of Kate

Assumed you want to use the kill option of htop, IOW you just wish to
use htop and no other program, then simply start kate with a file, by
running kate with a file name from a terminal or by opening a file by a
file manager with kate.

Instead of kate I use xfw as the editor and ps aux instead of htop.

$ ps aux|head -n1;ps aux | grep -v grep | grep xfw
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
rocketm+ 21724  0.0  0.3 126964 13888 pts/0    S+   00:19   0:00 xfw .config/openbox/autostart
rocketm+ 21725  0.0  0.3 126964 13944 pts/1    S+   00:19   0:00 xfw /var/log/mond.log
rocketm+ 21773  0.1  0.3 129572 15148 ?        S    00:27   0:01 xfw
rocketm+ 21779  0.0  0.4 129564 15220 ?        S    00:27   0:00 xfw
rocketm+ 21869  0.1  0.4 129576 15188 ?        S    00:41   0:00 xfw
rocketm+ 21886  0.4  0.4 129576 15256 pts/3    S+   00:43   0:00 xfw
rocketm+ 21902  4.2  0.3 127368 14040 ?        S    00:45   0:00 xfw /home/rocketmouse/.wireshark/preferences

It's easy to determine the PID of kate or xfw by the path and file names,
assumed kate or xfw opened a file from the terminal or by a file manager.

IOW instead of opening kate and then selecting a file, open a file manager,
select a file and open it with kate.




More information about the ubuntu-users mailing list