Check For Process And Kill If Running Linux

[Solved] Check For Process And Kill If Running Linux | Php - Code Explorer | yomemimo.com
Question : Check for process and kill if running Linux

Answered by : heydok

if pgrep process_name 2>/dev/null; then echo "Terminating process_name" pkill process_name
fi

Source : https://unix.stackexchange.com/questions/295585/check-for-process-and-kill-if-running | Last Update : Tue, 18 May 21

Question : how to kill running process in linux

Answered by : rajeev-punna

ps ux # list the running Process with PID
kill xxxx # hear xxxx is the process id

Source : | Last Update : Sun, 13 Dec 20

Answers related to check for process and kill if running linux

Code Explorer Popular Question For Php