Answers for "Check for process and kill if running Linux"

1

Check for process and kill if running Linux

if pgrep process_name 2>/dev/null; then
  echo "Terminating process_name"
  pkill process_name
fi
Posted by: Guest on May-11-2021
1

how to kill running process in linux

ps ux # list the running Process with PID
kill xxxx # hear xxxx is the process id
Posted by: Guest on December-06-2020

Code answers related to "Check for process and kill if running Linux"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language