How do you check if a program is running or not?

How do you check if a program is running or not?
Answer
Bash check if process is running or not
  1. pgrep command – Looks through the currently running bash processes on Linux and lists the process IDs (PID) on screen.
  2. pidof command – Find the process ID of a running program on Linux or Unix-like system.
 

Tìm kiếm

Back
Top