proc_pid_comm(5)
๐ proc_pid_comm(5) โ the manual page bestie ๐
okay so this one's from proc_pid_comm(5), aka the File Formats Manual, and it's literally about the tiniest file with the biggest main-character energy: the one that holds a process's command name. sit down, hydrate, let's go ๐ซถ
โจ NAME โจ
/proc/pid/comm โ command name. that's it. that's the whole vibe. ๐
๐ธ DESCRIPTION ๐ธ
๐ฆ /proc/pid/comm (since Linux 2.6.33)
bestie. this file exposes the process's comm value โ which is just the fancy way of saying the command name associated with the process. it's giving "hi, this is who i am" energy. โจ
and here's the part that lowkey surprises people: different threads inside the same process can have different comm values. you reach each thread's own copy through /proc/pid/task/tid/comm. not me finding out threads have their own little name tags ๐ญ
so can a thread change its name? periodt, yes. a thread may modify its own comm value, OR the comm value of any other thread in the same thread group (peep the discussion of CLONE_THREAD in clone(2) for the receipts), by writing to /proc/self/task/tid/comm. group project rules but make it naming. ๐
and now the fine print, because it matters: strings longer than TASK_COMM_LEN (16) characters โ including the terminating null byte โ are silently truncated. silently. no warning, no error, no drama text back. your name just gets cut off mid-sentence. 16 chars is the whole budget, girls, spend it wisely ๐
heads up bestie: it'sTASK_COMM_LEN=16and that count includes the terminating null byte, so you have less room than you think.
this file is a superset of the prctl(2) PR_SET_NAME and PR_GET_NAME operations, and it's the file that pthread_setname_np(3) uses when you're renaming threads that aren't the caller. so if you've ever wondered how thread renaming actually lands on disk โ it's here. ๐ง
oh and one more glow-up: the value in this file is the one used for the %e specifier in /proc/sys/kernel/core_pattern. see core(5). so yes, your core file names are riding on this. iconic. ๐
๐ SEE ALSO ๐
and that's the whole page, fr fr โ short, sweet, and absolutely ate. ๐
this page came to you courtesy of Linux man-pages 6.20, dated 2026-02-08. love that for us. ๐ฆ๐
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: GPL-3.0-or-later
- Copyright 1994-1995, Daniel Quinlan <Daniel.Quinlan@linux.org>
- Copyright 2002-2017, Michael Kerrisk <mtk.manpages@gmail.com>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms