How to list processes?

Discussion in 'Command Line' started by carbon333, Feb 16, 2012.

  1. carbon333

    carbon333 New Member

    Messages:
    87
    Likes Received:
    6
    Trophy Points:
    0
    You can do this by typing:


    ps aux

    in the terminal.
  2. bashcommando

    bashcommando Active Member

    Messages:
    212
    Likes Received:
    43
    Trophy Points:
    28
    top
    or
    htop
    Works well too
    spin89 likes this.
  3. Yitao Li

    Yitao Li New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    It depends on which UNIX you are using...

    "ps aux" would be the BSD syntax -- "a" for "all processes", "u" for "user format, "x" for lifting the "must have a tty" restriction

    "ps -ef" would be the Unix98 syntax -- "-e" for selecting all processes, "-f" for full-format listing.

    If I remember correctly : FreeBSD, OpenBSD, and NetBSD would support the BSD syntax only, while many other distributions would support both types of syntaxes.
    Last edited: Jul 6, 2014
  4. GildeNam

    GildeNam New Member

    Messages:
    8
    Likes Received:
    4
    Trophy Points:
    3
    To get information about all processes running on the system use ps -A.

    The top command is, like ps, used to display running processes, but it updates its display every few seconds.

    Source:
    ps command
    top command
    spin89 likes this.
  5. edward_haigh

    edward_haigh New Member

    Messages:
    23
    Likes Received:
    6
    Trophy Points:
    3
  6. Jefff

    Jefff New Member

    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    1
    Here's a way to get the top 10 CPU processes:
    Code:
    /bin/ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10
    And if you are looking for a specific process, this example uses apache.
    Code:
    ps aux | grep apache
  7. jerz4lunch

    jerz4lunch New Member

    Messages:
    21
    Likes Received:
    6
    Trophy Points:
    3
    Code:
    ps ax
    OR
    Code:
    top
    But I use the first one more.

Share This Page