Comments on: How to Find a Process Name Using PID Number in Linux https://www.tecmint.com/find-process-name-pid-number-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Thu, 13 Jul 2023 21:53:22 +0000 hourly 1 By: Aaron Kili https://www.tecmint.com/find-process-name-pid-number-linux/comment-page-1/#comment-834406 Thu, 03 Nov 2016 08:11:21 +0000 http://www.tecmint.com/?p=23261#comment-834406 In reply to Ren Yuntao.

@Ren

It works just fine, however, you need to specify process PID , for instance:

top -b -n 1 -p 2458 | tail -1 | awk ‘{print $NF}’

I know this is what you meant, am simply trying to remind users(especially newbies) who may run the command just as it is above, to know that the -p flag actually requires an argument(process ID).

Many thanks for the wonderful tip and always following us.

]]>
By: Ravi Saive https://www.tecmint.com/find-process-name-pid-number-linux/comment-page-1/#comment-834353 Thu, 03 Nov 2016 05:03:56 +0000 http://www.tecmint.com/?p=23261#comment-834353 In reply to Ren Yuntao.

@Ren,

Thanks for the sharing the tip, hope it will helpful to other Linux users as well..

]]>
By: Ren Yuntao https://www.tecmint.com/find-process-name-pid-number-linux/comment-page-1/#comment-834090 Wed, 02 Nov 2016 12:44:26 +0000 http://www.tecmint.com/?p=23261#comment-834090 Another way to find out a process name using PID:

$ top -b -n 1 -p | tail -1 | awk ‘{print $NF}’

]]>