SlideShare a Scribd company logo
The ps command



       Kevin O'Brien
Washtenaw Linux Users Group
  http://www.lugwash.org
What is ps?
●   ps stands for Process Status
●   Gives a list of all processes




                                    2
Usage
●   Type “ps” at the prompt, and you get very
    little
●   Switches are key, as always
●   To get a complete list, for instance, type “ps
    -A” (Note: Linux is case-sensitive)
●   Also, “ps -e” will give a complete list




                                                     3
Other switches you might want
●   -f give a full listing, i.e. more information
    about each process listed
●   -u username will list all processes running by
    a specific user
●   -l gives a long listing. This is even more data
    than in a full listing




                                                      4
Combining switches
●   You can use more than one switch at a time
●   Example: “ps -el” would give you a long
    listing of all of your processes
●   Example: “ps -el -u username” would give
    you a long listing of all processes owned by
    a certain username




                                                   5
Common use
●   The most common reason to use ps is the
    get the process ID for a process that is out of
    control
●   With the process ID you can use the kill
    command (e.g. “kill 6985” would kill
    whichever process had that process ID)




                                                      6
Piping
●   Sometimes, the list of processes can be long
●   If you only need to get a process ID, try
    piping to grep
●   Example: Firefox is frozen and I need to kill it
●   “ps -e | grep firefox” would return one line
    with the process for Firefox
●   I can then easily enter the kill command



                                                       7

More Related Content

PPTX
Process management in linux
PPTX
thread os.pptx
PPTX
Cpu scheduling in operating System.
PPT
Os Threads
PPTX
Thread scheduling in Operating Systems
PDF
Pthread
PPT
linux-commands.ppt
Process management in linux
thread os.pptx
Cpu scheduling in operating System.
Os Threads
Thread scheduling in Operating Systems
Pthread
linux-commands.ppt

What's hot (20)

PPT
Linux Commands
PPTX
Process management os concept
PPTX
Different types of Editors in Linux
PDF
Linux systems - Linux Commands and Shell Scripting
PPT
Operating System-Threads-Galvin
PPT
Fcfs scheduling
PPTX
Operating Systems: Process Scheduling
PPT
Common linux ubuntu commands overview
PPT
Unit 1 python (2021 r)
PPTX
Methods for handling deadlock
PDF
Course 102: Lecture 18: Process Life Cycle
PPTX
Linux and Java - Understanding and Troubleshooting
PDF
Process scheduling (CPU Scheduling)
PPT
Shell Scripting
PPTX
Semaphore
PPT
Ipc in linux
PPT
Operating Systems Process Scheduling Algorithms
PDF
Operating systems system structures
PDF
Unix - An Introduction
PDF
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Linux Commands
Process management os concept
Different types of Editors in Linux
Linux systems - Linux Commands and Shell Scripting
Operating System-Threads-Galvin
Fcfs scheduling
Operating Systems: Process Scheduling
Common linux ubuntu commands overview
Unit 1 python (2021 r)
Methods for handling deadlock
Course 102: Lecture 18: Process Life Cycle
Linux and Java - Understanding and Troubleshooting
Process scheduling (CPU Scheduling)
Shell Scripting
Semaphore
Ipc in linux
Operating Systems Process Scheduling Algorithms
Operating systems system structures
Unix - An Introduction
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Ad

Similar to The ps Command (20)

PPT
Processes And Job Control
PPTX
Processes
PPT
intro unix/linux 10
ODP
Linux Workshop , Day 3
PDF
2.1.using the shell
PDF
Linux: A Getting Started Presentation
DOCX
lec4.docx
PDF
Course 102: Lecture 17: Process Monitoring
ODP
Linux commd
ODP
Linux commd
ODP
Linux commd
PPTX
Presentation for RHCE in linux
PPTX
578781849-RHSA-1-Chap578781850-RHSA-1-Chapter-4ter-7.pptx
PPT
8.1.intro unix
PDF
Unit 10 investigating and managing
PPTX
An Introduction to Linux
PDF
MCLS 45 Lab Manual
PPT
Unix fundamentals
DOCX
Unix_commands_theory
Processes And Job Control
Processes
intro unix/linux 10
Linux Workshop , Day 3
2.1.using the shell
Linux: A Getting Started Presentation
lec4.docx
Course 102: Lecture 17: Process Monitoring
Linux commd
Linux commd
Linux commd
Presentation for RHCE in linux
578781849-RHSA-1-Chap578781850-RHSA-1-Chapter-4ter-7.pptx
8.1.intro unix
Unit 10 investigating and managing
An Introduction to Linux
MCLS 45 Lab Manual
Unix fundamentals
Unix_commands_theory
Ad

More from Kevin OBrien (20)

PPTX
American icon pmi
ODP
Tls 1.3
ODP
Forward Secrecy
ODP
Diffie_Hellman-Merkle Key Exchange
ODP
Password best practices and the last pass hack
ODP
SSL certificates
ODP
Encryption basics
ODP
Passwords
PDF
Linux Directory Structure
PDF
Hardware Discovery Commands
PDF
Introduction to linux
PDF
Help, my computer is sluggish
PDF
Installing Software, Part 3: Command Line
PDF
Installing Software, Part 2: Package Managers
PDF
Installing Software, Part 1 - Repositories
PDF
Installing Linux: Partitioning and File System Considerations
PDF
The ifconfig Command
PDF
Find and Locate: Two Commands
PDF
The Shell Game Part 4: Bash Shortcuts
PDF
The Shell Game Part 3: Introduction to Bash
American icon pmi
Tls 1.3
Forward Secrecy
Diffie_Hellman-Merkle Key Exchange
Password best practices and the last pass hack
SSL certificates
Encryption basics
Passwords
Linux Directory Structure
Hardware Discovery Commands
Introduction to linux
Help, my computer is sluggish
Installing Software, Part 3: Command Line
Installing Software, Part 2: Package Managers
Installing Software, Part 1 - Repositories
Installing Linux: Partitioning and File System Considerations
The ifconfig Command
Find and Locate: Two Commands
The Shell Game Part 4: Bash Shortcuts
The Shell Game Part 3: Introduction to Bash

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
Teaching material agriculture food technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Approach and Philosophy of On baking technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Empathic Computing: Creating Shared Understanding
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
The AUB Centre for AI in Media Proposal.docx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation_ Review paper, used for researhc scholars
20250228 LYD VKU AI Blended-Learning.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Teaching material agriculture food technology
Network Security Unit 5.pdf for BCA BBA.
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectroscopy.pptx food analysis technology
Approach and Philosophy of On baking technology
Unlocking AI with Model Context Protocol (MCP)
Programs and apps: productivity, graphics, security and other tools
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Empathic Computing: Creating Shared Understanding

The ps Command

  • 1. The ps command Kevin O'Brien Washtenaw Linux Users Group http://www.lugwash.org
  • 2. What is ps? ● ps stands for Process Status ● Gives a list of all processes 2
  • 3. Usage ● Type “ps” at the prompt, and you get very little ● Switches are key, as always ● To get a complete list, for instance, type “ps -A” (Note: Linux is case-sensitive) ● Also, “ps -e” will give a complete list 3
  • 4. Other switches you might want ● -f give a full listing, i.e. more information about each process listed ● -u username will list all processes running by a specific user ● -l gives a long listing. This is even more data than in a full listing 4
  • 5. Combining switches ● You can use more than one switch at a time ● Example: “ps -el” would give you a long listing of all of your processes ● Example: “ps -el -u username” would give you a long listing of all processes owned by a certain username 5
  • 6. Common use ● The most common reason to use ps is the get the process ID for a process that is out of control ● With the process ID you can use the kill command (e.g. “kill 6985” would kill whichever process had that process ID) 6
  • 7. Piping ● Sometimes, the list of processes can be long ● If you only need to get a process ID, try piping to grep ● Example: Firefox is frozen and I need to kill it ● “ps -e | grep firefox” would return one line with the process for Firefox ● I can then easily enter the kill command 7