There are several commands that can be used to check running processes in Ubuntu Linux using the command line.
ps
command: Theps
command can be used to view information about processes that are currently running on the system. The basic syntax isps [options]
. For example, to view all processes running on the system, you can use the command:
ps aux
This will display a list of all processes, along with their process ID (PID), user, and other information.
top
command: Thetop
command can be used to view real-time information about processes that are currently running on the system. The command provides an ongoing look at the processes running on the system, including the process ID (PID), user, and other information. (https://northeastohiogastro.com)
top
htop
command:htop
is an interactive process viewer for Linux. It is similar to thetop
command, but provides a more user-friendly interface and additional features. You can install htop by runningapt-get install htop
command. Once installed, you can usehtop
command to view running processes on your system.
htop
pgrep
command: Thepgrep
command can be used to search for processes based on their names. For example, to find the process ID of the Apache web server, you can use the command:
pgrep apache2
pstree
command: Thepstree
command can be used to view a tree-like representation of the processes running on the system. It will show the relationships between parent and child processes.
pstree
All of the above commands provide different ways to check running processes on your Ubuntu Linux system. You can use the one that best suits your needs.