SAGARFIVE

Linux – processes

To view currently running processes on the system with the ps command. It mostly return PID(Process ID), TTY(type of terminal ), TIME(process cpu use time),CMD(command used)

1ps -efList currently running process in full format
2ps -axList current running process
3ps -u <username>Listing the processes related to specific user
4ps -C <command>Listing the process related to specific command
5ps -p <pid>Listing the process with pid
6ps -ppid <ppid>Listing with parent process id related process 
7pstreeShows processes in hierarchy
8ps -LList all threads for a particular process

Finding Process ID:

ps -ef | grep <installed package name>
example: ps -ef  | grep tree

Linux Terminating :
There are four ways to kill or terminate a process. commands allow you to run the system uninterruptedly after terminating a process without rebooting the system. commands can be internal or external.

1killTo terminate a process is a kill command. You need to know the PID of the process
2killallIt kills all the processes with the specified name in the system.
3pkillThe pkill command uses the name of the process either by typing full name or partial name.
4xkillCommand xkill is used to kill a process on X server without passing process name or PID