PIDOF(1)
๐ PIDOF(1) โ the "where my girls at" command ๐
okay bestie, so you know that one command where you're like "who is running this program rn" and you need the actual process id? that's pidof(1), and she is the main character of the process-hunting world. she's a general commands manual page girly, and she ate, no cap.
๐ธ NAME ๐ธ
pidof โ find the process ID of a running program ๐
โจ SYNOPSIS โจ
pidof [-s] [-c] [-q] [-w] [-x] [-o omitpid[,...]] ... [-t] [-S
separator] program ...
๐ฆ DESCRIPTION ๐ฆ
So like, pidof finds the process id's (pids) of the named programs. that's it, that's the whole gig. she prints those id's straight to standard output, cute and simple, and honestly? obsessed. ๐ซถ
๐ OPTIONS ๐
-sโ single shot, babes. this tells the program to only return one pid. just one. not a whole crowd, just the one. โจ-cโ only return process ids that are running with the same root directory. lowkey important: this option is ignored for non-root users, because they literally can't check the current root directory of processes they don't own. it's giving "not your business, bestie". ๐-qโ quiet mode. suppress any output and only sets the exit status accordingly. she's silent but she's still judging you via exit codes. ๐คซ-wโ show also processes that do not have a visible command line, like kernel worker threads. they're the invisible girlies of the process world. ๐ป-xโ scripts too! this causes the program to also return process id's of shells running the named scripts. she's inclusive like that. ๐-oomitpid โ tellspidofto omit processes with that process id. the special pid%PPIDcan be used to name the parent process of thepidofprogram, in other words the calling shell or shell script. so you can literally be like "not my mom, please" and it understands. ๐ญ-tโ shows all thread ids instead of pids. threads are the pids' little sisters and they also deserve representation. ๐ง-Sseparator โ use separator as a separator put between pids. used only when more than one pids are printed for the program. oh and btw, the-doption is an alias for this option, for sysvinitpidofcompatibility. legacy queen behavior. ๐-dโ not listed on her own line but she's real and she's the alias for-S, for sysvinitpidofcompatibility. iykyk. ๐
๐ฅ EXIT STATUS ๐ฅ
0โ at least one program was found with the requested name. slay, we found her. ๐1โ no program was found with the requested name. she's not here, bestie, go home. ๐ญ
๐ BUGS ๐
when using the -x option, pidof only has a simple method for detecting scripts and will miss scripts that, for example, use env. this limitation is due to how the scripts look in the proc filesystem. so yeah, she's not psychic, she's just reading /proc, and /proc is doing the most. not her fault fr fr. ๐
๐ SEE ALSO ๐
pgrep(1), pkill(1) โ her cousins, her sisters, her whole friend group. go say hi. ๐
๐ AUTHOR ๐
Jaromir Capik โ the icon, the legend, the moment. thank you for your service. ๐ซก
okay and that's the whole page, bestie!! this little gem lives in procps-ng, and she's dated 2023-01-16 โ so go forth and pidof responsibly, mwah ๐โจ๐ฆ
๐ฆ where this page comes from
- alpine 3.23: procps-ng-doc 4.0.5-r0 ยท GPL-2.0-or-later AND LGPL-2.1-or-later
- alpine 3.24: procps-ng-doc 4.0.6-r0 ยท GPL-2.0-or-later AND LGPL-2.1-or-later
- arch rolling: procps-ng 4.0.7-1 ยท GPL AND LGPL
- fedora 44: procps-ng 4.0.6-1.fc44 ยท GPL-2.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 44: procps-ng 4.0.6-1.fc44 ยท GPL-2.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later
- nixos 26.05: procps 4.0.6
- nixpkgs unstable: procps 4.0.7
- opensuse-leap 16.0: procps 4.0.5-160000.2.2 ยท GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: procps 4.0.5-160000.2.2 ยท GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: procps 4.0.5-160000.2.2 ยท GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: procps 4.0.5-160000.2.2 ยท GPL-2.0-or-later AND LGPL-2.1-or-later
- Copyright (c) 2018-2023 Jim Warner <james.warner@comcast.net>
- Copyright (c) 2019-2023 Craig Small <csmall@dropbear.xyz>
- Copyright (c) 2013 Jaromir Capik <jcapik@redhat.com>
- Copyright (c) 1998 Miquel van Smoorenburg
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms