linux command see if a process is running code example
Example 1: bash check if process is running by name
if pgrep -x "<PROCESS_NAME>" > /dev/null; then
echo "Running"
else
echo "Not running"
fi
Example 2: check running process in linux
ps -aux
# (print all processes owned by a user named "x")