getting pid of a process linux code example
Example 1: ubuntu get pid of process
#to search for pid
ps ax | grep firefox
#and to kill it run
sudo kill -9 THE_PID_NUMBER
Example 2: find process by pid linux
$ ps -p PID -o format
#to search for pid
ps ax | grep firefox
#and to kill it run
sudo kill -9 THE_PID_NUMBER
$ ps -p PID -o format