SlideShare a Scribd company logo
3
Most read
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

What's hot (20)

PPTX
Terminal Commands (Linux - ubuntu) (part-1)
raj upadhyay
 
PDF
History of C#
aschlapsi
 
PPTX
Unix ppt
Dr Rajiv Srivastava
 
PPTX
Linux process management
Raghu nath
 
PPTX
Unix
Erm78
 
PPTX
Bash Shell Scripting
Raghu nath
 
PPTX
Shell scripting
simha.dev.lin
 
PPT
chapter 1 intoduction to operating system
Siddhi Viradiya
 
PPT
Ipc in linux
Dr. C.V. Suresh Babu
 
PDF
Process Management
Christalin Nelson
 
PPTX
Unix Linux Commands Presentation 2013
Wave Digitech
 
PPTX
UNIX Operating System
Fatima Qayyum
 
PDF
Shell scripting
Manav Prasad
 
PPTX
Unix signals
Isaac George
 
PPT
Shell Scripting
Gaurav Shinde
 
PPTX
Linux commands
penetration Tester
 
PDF
Course 102: Lecture 28: Virtual FileSystems
Ahmed El-Arabawy
 
PPTX
UNIX Operating System
Unless Yuriko
 
PDF
CPU Scheduling
Christalin Nelson
 
PPT
12 process control blocks
myrajendra
 
Terminal Commands (Linux - ubuntu) (part-1)
raj upadhyay
 
History of C#
aschlapsi
 
Linux process management
Raghu nath
 
Unix
Erm78
 
Bash Shell Scripting
Raghu nath
 
Shell scripting
simha.dev.lin
 
chapter 1 intoduction to operating system
Siddhi Viradiya
 
Ipc in linux
Dr. C.V. Suresh Babu
 
Process Management
Christalin Nelson
 
Unix Linux Commands Presentation 2013
Wave Digitech
 
UNIX Operating System
Fatima Qayyum
 
Shell scripting
Manav Prasad
 
Unix signals
Isaac George
 
Shell Scripting
Gaurav Shinde
 
Linux commands
penetration Tester
 
Course 102: Lecture 28: Virtual FileSystems
Ahmed El-Arabawy
 
UNIX Operating System
Unless Yuriko
 
CPU Scheduling
Christalin Nelson
 
12 process control blocks
myrajendra
 

Similar to The ps Command (20)

PPTX
Linux week 2
Vinoth Sn
 
PDF
Linux: A Getting Started Presentation
Nap Ramirez
 
PDF
Linux Server Deep Dives (DrupalCon Amsterdam)
Amin Astaneh
 
PPTX
UNIX/Linux training
Michael Olafusi
 
PPTX
Linux tech talk
Prince Raj
 
ODP
Linux Workshop , Day 3
Quotient Technology Inc.
 
PDF
Linux Internals - Part I
Emertxe Information Technologies Pvt Ltd
 
PPTX
Linuxtraining 130710022121-phpapp01
Chander Pandey
 
PDF
LSOF Command Usage on RHEL 7
VCP Muthukrishna
 
PPT
PENETRATION TESTING INFORMATION GATHERING.ppt
jospinjj
 
PPTX
linux cmds.pptx
divyanshianand3
 
PPTX
Linux Commands all presentation file .pptx
AshutoshPrajapati30
 
PDF
An Introduction To Linux
Ishan A B Ambanwela
 
PPTX
unit 3 ppt file represented system......
AnshJaiswal31
 
PDF
Ericas-Linux-Plus-Study-Guide
Erica StJohn
 
PPT
Unix 2 en
Simonas Kareiva
 
ODP
Introduction to Shell script
Bhavesh Padharia
 
PPTX
Linux Presentation
Muhammad Qazi
 
PPT
unixkkkkmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmkkk.ppt
sufiankedir156
 
Linux week 2
Vinoth Sn
 
Linux: A Getting Started Presentation
Nap Ramirez
 
Linux Server Deep Dives (DrupalCon Amsterdam)
Amin Astaneh
 
UNIX/Linux training
Michael Olafusi
 
Linux tech talk
Prince Raj
 
Linux Workshop , Day 3
Quotient Technology Inc.
 
Linuxtraining 130710022121-phpapp01
Chander Pandey
 
LSOF Command Usage on RHEL 7
VCP Muthukrishna
 
PENETRATION TESTING INFORMATION GATHERING.ppt
jospinjj
 
linux cmds.pptx
divyanshianand3
 
Linux Commands all presentation file .pptx
AshutoshPrajapati30
 
An Introduction To Linux
Ishan A B Ambanwela
 
unit 3 ppt file represented system......
AnshJaiswal31
 
Ericas-Linux-Plus-Study-Guide
Erica StJohn
 
Unix 2 en
Simonas Kareiva
 
Introduction to Shell script
Bhavesh Padharia
 
Linux Presentation
Muhammad Qazi
 
unixkkkkmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmkkk.ppt
sufiankedir156
 
Ad

More from Kevin OBrien (20)

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

Recently uploaded (20)

PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
PDF
"Effect, Fiber & Schema: tactical and technical characteristics of Effect.ts"...
Fwdays
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PDF
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
PDF
Productivity Management Software | Workstatus
Lovely Baghel
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
PDF
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
PPTX
The Yotta x CloudStack Advantage: Scalable, India-First Cloud
ShapeBlue
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
PPTX
Machine Learning Benefits Across Industries
SynapseIndia
 
PDF
CIFDAQ'S Token Spotlight for 16th July 2025 - ALGORAND
CIFDAQ
 
PPTX
UI5Con 2025 - Get to Know Your UI5 Tooling
Wouter Lemaire
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PDF
HR agent at Mediq: Lessons learned on Agent Builder & Maestro by Tacstone Tec...
UiPathCommunity
 
PDF
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
PDF
Bitcoin+ Escalando sin concesiones - Parte 1
Fernando Paredes García
 
PPTX
UI5Con 2025 - Beyond UI5 Controls with the Rise of Web Components
Wouter Lemaire
 
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
"Effect, Fiber & Schema: tactical and technical characteristics of Effect.ts"...
Fwdays
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
Productivity Management Software | Workstatus
Lovely Baghel
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
The Yotta x CloudStack Advantage: Scalable, India-First Cloud
ShapeBlue
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
Machine Learning Benefits Across Industries
SynapseIndia
 
CIFDAQ'S Token Spotlight for 16th July 2025 - ALGORAND
CIFDAQ
 
UI5Con 2025 - Get to Know Your UI5 Tooling
Wouter Lemaire
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
HR agent at Mediq: Lessons learned on Agent Builder & Maestro by Tacstone Tec...
UiPathCommunity
 
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
Bitcoin+ Escalando sin concesiones - Parte 1
Fernando Paredes García
 
UI5Con 2025 - Beyond UI5 Controls with the Rise of Web Components
Wouter Lemaire
 

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