Monitoring running processes is a critical aspect of system administration in Linux environments. It allows system administrators to track resource usage, identify potential performance issues, and troubleshoot errors effectively. There are several commands and techniques available in Linux to check if a specific process is running.
The most straightforward method is to use the `ps` command. `ps` displays a list of currently running processes along with their process IDs (PIDs), memory usage, and other details. To check if a particular process is running, you can use the `-C` option followed by the process name or PID. For example, the following command checks if a process named “apache2” is running: