how to get pid of a process in 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: how to get process id in linux
lsof -i tcp:3000
kill -9 pId