How to check running process in Ubuntu Linux using command line
There are several ways to check running processes in Ubuntu Linux using the command line. Here are a few common methods:
pscommand: Thepscommand is used to display information about the current running processes. You can use theps auxcommand to display all processes running on the system, along with their user, pid and other details.
ps auxtopcommand: Thetopcommand provides an ongoing look at the processes running on a system, including their CPU and memory usage. Usetopcommand to check the running process in real time.
tophtopcommand: Thehtopcommand is similar to thetopcommand, but it provides a more user-friendly interface with additional features such as highlighting the process using the most resources and allowing you to interactively kill processes.
htoppgrepcommand: Thepgrepcommand is used to search for processes based on their name. You can use it to find the process ID (PID) of a specific process. For example, to find the PID of the process named 'apache2':
pgrep apache2pkillcommand: Thepkillcommand is used to signal a process based on its name. For example, to send the TERM signal to the process named 'Apache2':
pkill -TERM Apache2You can use any of these command as per your requirement, it depends on the details you need to see and the way you want to see it.
