$! is the PID of the last backgrounded process.
kill -0 $PID checks whether it's still running.
$$ is the PID of the current shell.
lsof -i tcp:3000
kill -9 pId
# Procedure to find process by name on Linux
# Open the terminal application.
# Type the pidof command as follows to find PID for firefox process:
$ pidof firefox
# Or use the ps command along with grep command as follows:
$ ps aux | grep -i <search term>
# To look up or single processes based on name use the following syntax:
$ pgrep firefox