Show all Running Processes in Linux

Source: Internet
Author: User
Tags sessions

PS because of historical reasons, so very peculiar, some commands must add "-", such as:

PS A

The above notation is wrong.

Simple selection ********* ********* selection by list *********-a All processes-C by command name-N Negate Selection-G by Real Group ID (supports names)-A AllW/TTY except session leaders-U by Real user ID (supports names)-D All except session leaders-g by session OR by effective group name-E All Processes-p by Process IDT all processes in this terminal-S processesinchThe sessions Givena allW/TTY, including other users-T by Ttyg OBSOLETE--Don't use-u by effective user ID (supports names) r only running processes U processes forSpecified USERSX processesW/o controlling TTYs t by TTYOutput Format ********** ***********LongOptions ***********-o,o user-defined-f full--group--user--pid--cols--Ppid-j,j job Control s signal--group--user--sid--rows--Info-o,o preloaded-o v virtual memory--cumulative--format--deselect-l,lLongU user-oriented--Sort--tty--forest--version-F Extra Full X registers--heading--no-heading--ContextMisc Options *********-v,v Show version L list format codes F ASCII Art Forest-m,m,-l,-t,h Threads S Childreninch sum-Y Change-l Format-m,z Security Data CtrueCommand name-C Scheduling Class-W,WWide output n Numeric Wchan,uid-H process Hierarchy[[email protected] smplayer]$PSaerror:unsupported option (BSD syntax)Simple selection ********* ********* selection by list *********-a All processes-C by command name-N Negate Selection-G by Real Group ID (supports names)-A AllW/TTY except session leaders-U by Real user ID (supports names)-D All except session leaders-g by session OR by effective group name-E All Processes-p by Process IDT all processes in this terminal-S processesinchThe sessions Givena allW/TTY, including other users-T by Ttyg OBSOLETE--Don't use-u by effective user ID (supports names) r only running processes U processes forSpecified USERSX processesW/o controlling TTYs t by TTYOutput Format ********** ***********LongOptions ***********-o,o user-defined-f full--group--user--pid--cols--Ppid-j,j job Control s signal--group--user--sid--rows--Info-o,o preloaded-o v virtual memory--cumulative--format--deselect-l,lLongU user-oriented--Sort--tty--forest--version-F Extra Full X registers--heading--no-heading--ContextMisc Options *********-v,v Show version L list format codes F ASCII Art Forest-m,m,-l,-t,h Threads S Childreninch sum-Y Change-l Format-m,z Security Data CtrueCommand name-C Scheduling Class-W,WWide output n numeric wchan,uid-h process hierarchy

how do I See all running process in Linux operating systems using command Line or GUI options?

Need to use the PS command. It provide information about the currently running processes, including their process identification numbers (PIDS). Both Linux and UNIX support for the PS command to display information the running process. The PS command gives a snapshot of the current processes. If you want a repetitive update of the This status, use top, atop, and/or Htop command as described below.

Tutorial Details  
Difficulty Easy (RSS)
Root Privileges Yes
Requirements Ps/top/htop
Estimated completion time 5 minutes

Apart from PS command, you can also with the following commands to display info about processes on Linux:

    1. topCommand:display and update sorted information about processes.
    2. atop: Advanced System & Process Monitor.
    3. htop: Interactive Process Viewer.
The PS command

Type the following PS command to display all running process:

PS  Less

Where,

    • -a:select All Processes
    • A:select all processes on a terminal, including those of other users
    • X:select processes without controlling ttys
Task:see every process on the system
PS -PS -E

The above two commands are the same.

Task:see every process except those running as root
PS -u root-u root-n
PS -u maijunjin| grep su 3640 pts/2    xx:xx:su23654 pts/2 XX: xx    sups -u maijunjin| grep su

Task:see process run by user Vivek
PS -u Vivek
Task:top command

The top program provides a dynamic real-time view of a running system. Type the top at command prompt:

# Top

Output:

Fig.01:top Command:display Linux Tasks

To quit press Q, for help press H.

Task:display a tree of processes

Pstree shows running processes as a tree. The tree is rooted at either PID or init if PID is omitted. If A user name is specified, the all process trees rooted at processes owned by, the user is shown.

$ pstree


Sample outputs:

Fig.02:pstree-display a tree of processes

Task:print a process tree using PS
PS -PS AXJF
Task:get info about Threads

Type the following command:

PS -PS AXJF
Task:get info about Threads

Type the following command:

Show all Running Processes in Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.