Close Menu
  • Analog Design
    • Latest Analog Layout Interview Questions (2025)
  • Digital Design
    • Digital Electronics Interview Question(2025)
    • Top VLSI Interview Questions
  • Physical Design
    • Physical Design Interview Questions for VLSI Engineers
  • Verilog
    • Verilog Interview Questions(2024)
  • Forum
Facebook Instagram YouTube LinkedIn WhatsApp
SiliconvlsiSiliconvlsi
Forum Questions Register in Forum Login in Forum
Facebook Instagram YouTube LinkedIn WhatsApp
  • Analog Design
    • Latest Analog Layout Interview Questions (2025)
  • Digital Design
    • Digital Electronics Interview Question(2025)
    • Top VLSI Interview Questions
  • Physical Design
    • Physical Design Interview Questions for VLSI Engineers
  • Verilog
    • Verilog Interview Questions(2024)
  • Forum
SiliconvlsiSiliconvlsi
Home»Linux»ps Command in Linux/Unix
Linux

ps Command in Linux/Unix

siliconvlsiBy siliconvlsiJanuary 20, 2024No Comments2 Mins Read
Facebook Pinterest LinkedIn Email WhatsApp
Share
Facebook Twitter LinkedIn Pinterest Email

ps Command in LinuxUnix

ps Command in Linux/Unix with Examples

The ps command in Linux is used to view currently running processes on the system. It provides detailed information about processes, including their process ID (PID), resource usage, user ID, command name, and more.

Introduction to PS Command

The ps command shows details of running processes, and it can be used with various options to customize the output. It helps in monitoring system activities, resource utilization, and identifying specific processes.

Syntax:

ps [options]

Example:

$ ps

Output

The output includes columns such as PID (Process ID), %CPU (CPU usage), %MEM (Memory usage), ADDR (Memory address), COMMAND (Command name), USER (Username), TTY (Terminal), TIME (CPU time), and more.

Options:

ps -ef or ps -aux: List currently running processes in full format.

$ ps -ef

ps -ax: List all currently running processes.

$ ps -ax

ps -u <username>: List processes for a specific user.

$ ps -u john

ps -C <command>: List processes for a given command.

$ ps -C apache2

ps -p <PID>: List processes with a given Process ID.

$ ps -p 1234

ps -ppid <PPID>: List processes with a given Parent Process ID.

$ ps -ppid 5678

pstree: Show processes in the hierarchy.

$ pstree

ps -L: List all threads for a particular process.

$ ps -L 5678

ps --sort pmem: Find memory usage and sort by memory.

$ ps --sort pmem

ps -eo: Show security information.

$ ps -eo pid,user,cmd

ps -U root -u root u: Show processes running as root.

$ ps -U root -u root u

Linux ps -ef and ps -aux: To display all currently running processes in full format, two common commands are used:

  • ps -ef
  • ps -aux

Example:

$ ps -ef

This command provides a detailed list of all running processes, including information about CPU and memory usage.

Linux ps -ax: The ps -ax command lists all currently running processes on the system.

Example:

$ ps -ax

This command displays a long list of processes, providing information such as PID, TTY, TIME, and CMD.

These examples demonstrate how the ps command can be used to gather information about processes, identify resource usage, and monitor system activities.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

Related Posts

Delete words after certain word in each line in gvim

January 28, 2024

Linux date Command

January 22, 2024

What is a Linux locate Command?

January 22, 2024
Leave A Reply Cancel Reply

Facebook X (Twitter) Instagram Pinterest Vimeo YouTube
  • About Us
  • Contact Us
  • Privacy Policy
© 2025 Siliconvlsi.

Type above and press Enter to search. Press Esc to cancel.