← Back to Bash Course | Chapter 10: Text Processing Tools | Lesson 1 of 12

ps कमांड

ps एक class roll call जैसा है जो हर currently running program को list करता है, हर एक की अपनी ID number के साथ, ताकि आपको पता हो कि आपके computer पर कौन चल रहा है।

In this page:

  1. ps Command
Syntax
bash
ps [options]
ps -p process_id

ps Command

ps currently running processes को list करता है, process ID (PID), status, और उन्हें start करने वाले command जैसी information दिखाते हुए। ps aux एक common invocation है जो detailed columns के साथ सभी users के सभी processes दिखाता है।

यह एक system पर क्या चल रहा है inspect करने का primary tool है।

Note: एक specific process को नाम से ढूंढने के लिए ps aux को grep में pipe करें, जैसे ps aux | grep myscript।

उदाहरण: The ps Command

bash
#!/bin/bash
echo "Current shell's PID: $$"
ps -p $$
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
आम गलतियां
  1. ps aux | grep name उपयोग करना और grep process को खुद match करना।
  2. यह भूल जाना कि ps options systems के बीच अलग हैं।
  3. Scripts में default ps output parse करना, जब ps -o pid,comm stable columns देता है।
🔒

Chapter Quiz — Complete all 12 topics to unlock

0/12 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.