Ubuntu Find Process by Name

May 21, 2019

ps

ps -fC name

NOTE: man ps

UID        PID  PPID  C STIME TTY          TIME CMD
root      1211     1  0 May19 ?        00:00:00 nginx: master process /usr/sbin/
www-data  1212  1211  0 May19 ?        00:00:14 nginx: worker process
www-data  1213  1211  0 May19 ?        00:00:00 nginx: worker process

ps | grep

ps aux | grep name
root      1211  0.0  0.0 130760    36 ?        Ss   May19   0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
www-data  1212  0.0  0.0 130760  1048 ?        S    May19   0:14 nginx: worker process
www-data  1213  0.0  0.0 130760  1048 ?        S    May19   0:00 nginx: worker process
luaz     22158  0.0  0.0  17184  1020 pts/3    S+   20:05   0:00 grep --color=auto nginx

PID only

pgrep nginx
1211
1212
1213

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.