Most Useful Examples of Linux 'ps' Command [Updated 2022]
'ps' Linux Command is used to display the current process on the terminal. It is preinstalled on Linux-based machines and helps in identifying current processes on hosts. This command is similar of using Task Manager to see all the processes running in both foreground and background.
Here is a list of available options which can be retrieved by using the below help command. This command display more options that guide you to display commands further.
Display most used available options of 'ps' command
Display help options based on specific group id, session id, process id, and many more
Display help options to format the output
Display more details on help options
Display all help options available
To list out all processes
Display all except session leaders
Display running processes
Display all processes on terminal
Display only PID and USER details
$ps -e -o pid,uname
Display environment details that include PID, TTY, STAT, TIME, MAJFL, TRS, DRS, %MEM, COMMAND
Display all processes in BSD format
Now to close any program, use the "kill" command with PID
Whenever you are using Ctrl + C to stop the running process on the terminal screen, actually you use the kill command to close the program. Here, Ctrl + C acts as a shortcut for the kill command.
"ps" command is a goldmine for Linux administrators and cyber security professionals. By using this command, you can easily locate what programs are running on the system.
Subscribe us to receive more such articles updates in your email.
If you have any questions, feel free to ask in the comments section below. Nothing gives me greater joy than helping my readers!
Disclaimer: This tutorial is for educational purpose only. Individual is solely responsible for any illegal act.