linux pid of process code example Example 1: find process by pid linux $ ps -p PID -o format Example 2: how to get process id in linux lsof -i tcp:3000 kill -9 pId