There are several ways to check running processes in Ubuntu Linux using the command line. Here are a few common methods:
ps
command: Theps
command is used to display information about the current running processes. You can use theps aux
command to display all processes running on the system, along with their user, pid and other details.
ps aux
top
command: Thetop
command provides an ongoing look at the processes running on a system, including their CPU and memory usage. Usetop
command to check the running process in real time.
top
htop
command: Thehtop
command is similar to thetop
command, 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.
htop
pgrep
command: Thepgrep
command 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 apache2
pkill
command: Thepkill
command is used to signal a process based on its name. For example, to send the TERM signal to the process named ‘Apache2’:
pkill -TERM Apache2
You 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.