How You Know You’re Doing ps Command Linux The Right Way – Video

In this article we are going to see ps command Linux as video session. ps command displays report a snapshot of the current processes. ps displays information about a selection of the active processes.  If you want a repetitive update of the selection and the displayed information, use top instead.

ps command Linux

To see every process on the system using standard syntax

[root@ArkITShell ~]# ps -e
[root@ArkITShell ~]# ps -ef
[root@ArkITShell ~]# ps -eF
[root@ArkITShell ~]# ps -ely

See every process on the system using BSD syntax

[root@ArkITShell ~]# ps ax
[root@ArkITShell ~]# ps axu

Print a process tree

[root@ArkITShell ~]# ps -ejH
[root@ArkITShell ~]# ps axjf

Get info about threads

[root@ArkITShell ~]# ps -eLf
[root@ArkITShell ~]# ps axms

Security info

[root@ArkITShell ~]# ps -eo euser,ruser,suser,fuser,f,comm,label
 [root@ArkITShell ~]# ps axZ
 [root@ArkITShell ~]# ps -eM

To see every process running as root (real & effective ID) in user format:

[root@ArkITShell ~]# ps -U root -u root u

To see every process with a user-defined format

[root@ArkITShell ~]# ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
 [root@ArkITShell ~]# ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
 [root@ArkITShell ~]# ps -Ao pid,tt,user,fname,tmout,f,wchan

Print only the process IDs of syslogd

[root@ArkITShell ~]# ps -C syslogd -o pid=

Print only the name of PID 42

[root@ArkITShell ~]# ps -q 42 -o comm=

That’s about ps command in Linux. 

Related Articles

analyze Linux system performance

20 ssh interview questions and answers

Linux directory structure changed in RHEL7 – FHS file hierarchy standard

Thanks for Your Wonderful Support and Encouragement

More than 40,000 techies are part of our ARKIT community. Join us today and keep learning Linux, Cloud, Storage, DevOps, and IT technologies.

Get Email Updates Download E-Books Facebook Page YouTube Channel Twitter Join Telegram Group Join WhatsApp Group
Ravi Kumar Ankam
My name is Ravi Ankam. I am passionate about learning new technologies quickly and sharing knowledge with others. My goal is to help learners grow their skills, because the more you learn, the more you earn. See About Me

Ravi Kumar Ankam

My name is Ravi Ankam. I am passionate about learning new technologies quickly and sharing knowledge with others. My goal is to help learners grow their skills, because the more you learn, the more you earn. See About Me

Leave a Reply

Your email address will not be published. Required fields are marked *

Exit mobile version