Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Is there any other command to view thread Id in /proc as ls command doesn't work? Commented Mar 5, 2022 at 11:16
  • "…I suspect it's to preserve compatibility…" My opinion is that it is linked to the fact that The thread ID of the initial (main) thread is the same as the process ID of the entire process. Commented Mar 5, 2022 at 11:43
  • @MC68020 exactly, so programs expecting to find “pids” only in /proc don’t break since tids don’t appear there. Commented Mar 5, 2022 at 12:00
  • @Prvt_Yadav ls /proc/*/task/ Commented Mar 5, 2022 at 12:01