Simple Command To Find Out Process ID on Linux

Simple one line command can be used in Linux bash script to get Process ID for set of processes:
ps -ef | grep PROCESS_TO_FIND | grep -v grep | awk ‘{ print $2 }’

where
ps -ef : Lists all processes with details
grep : Looks for particular process
grep -v : Avoid default grep process
awk: To find process id

So it’s a simple of finding process id.