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:

  1. ps command: The ps command is used to display information about the current running processes. You can use the ps aux command to display all processes running on the system, along with their user, pid and other details.
ps aux
  1. top command: The top command provides an ongoing look at the processes running on a system, including their CPU and memory usage. Use top command to check the running process in real time.
top
  1. htop command: The htop command is similar to the top 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
  1. pgrep command: The pgrep 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
  1. pkill command: The pkill 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.

Leave a Comment