• Home
  • Docker
  • Kubernetes
  • LLMs
  • Java
  • Ubuntu
  • Maven
  • Big Data
  • Archived
Linux-Ubuntu | ps -- List processes
  1. Notes
  2. Examples
  3. Command Help (man ps)

  1. Notes

    For the processes which have been selected for display, the default information to display includes:
    The process ID (PID), the controlling terminal (TTY), the CPU time the process has used, and the associated command.

    The ps command supports three different types of options:
    • Unix-style options: they are preceded by a dash character (-f, ...).
    • BSD-style options: they are not preceded by a dash character (x, ...).
    • GNU long options: they are preceded by a double dash characters (--forest, ...).

    Here's a list of some the headers that are displayed by the ps command:
    • UID: the user that started the process.
    • PID: the process ID.
    • PPID: the process ID of the parent of the process.
    • C: the utilization of the processor.
    • STIME: the system time when the process started.
    • TTY: the terminal that started the process.
    • TIME: the total time required to run the process.
    • CMD: the command that started the process.

    Extra headers can be shown with the option -l:
    • F: the system flags assigned to the process by the kernel.
    • S: the state of the process (O: running, S: sleeping, R: runnable, Z: zombie, T: stopped).
    • PRI: the priority of the process (lower numbers means higher priority).
    • NI: the nice value.
    • ADDR: the memory address of the process.
    • SZ: the swap space required by the process.
    • WCHAN: the address of the kernel where the process is sleeping.

    The BSD-style option l show a special header STAT that display the state of the process using two characters:
    • The first character shows the state of the process (O: running, S: sleeping, R: runnable, Z: zombie, T: stopped).
    • The second character shows the status of the process:
      • <: the process is running at high priority.
      • N: the process is running at low priority.
      • L: the process has pages locked in memory.
      • s: the process is a session leader.
      • l: the process is multi-threaded.
      • +: the process is running in the foreground.
  2. Examples
    • List processes that belongs to the current user and running on the current terminal:

      • Default output:

      • Full-format:

      • Long format (Unix-style option):

      • Long format (BSD-style option):

    • List processes that belongs to the current user including processes without a terminal device assigned:

    • Display processes hierarchy (the relationship between processes is drawn using ASCII characters):

    • List all processes:


    • List PID processes:



    • Kill processes:
  3. Command Help (man ps)
    Basic options:

    Selection by list:

    The selection options take as their argument either:
    - a comma-separated list e.g. '-u root,nobody'
    - or a blank-separated list e.g. '-p 123 4567'

    Output formats:

    Show threads:

    Miscellaneous options:
© 2025  mtitek