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


My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

You may also like...

Leave a Reply