Prozesse verstehen: `ps`, `top`, `htop`
Lernen Sie Befehle kennen, mit denen Sie aktive Prozesse auf Ihrem Linux-System anzeigen, überwachen und verstehen können.
Prozesse verstehen: `ps`, `top`, `htop` ist eine kostenlose Linux Command Line Mastery-Lektion auf CoddyKit. Dies ist Lektion 1 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Linux Command Line Mastery-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Linux Command Line Mastery-Kurs umfasst insgesamt 4 Lektionen.
Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.
What Are Processes?
Welcome! In this lesson, we'll explore how to view and monitor programs running on your Linux system. These running programs are called processes.
Understanding processes is crucial for system administration, troubleshooting, and managing resource usage.
`ps`: Snapshot of Processes
The simplest way to see active processes is with the ps command. It gives you a snapshot of current processes.
By default, ps shows processes owned by your user in the current terminal session.
psMore `ps` Details: `aux` and `-ef`
To see all processes on the system, including those owned by other users and system processes, we use options like aux or -ef.
a: Show processes for all users.u: Display user/owner.x: Show processes without a controlling terminal.
The -ef option is a common alternative on some systems, providing similar comprehensive output.
ps auxDeciphering `ps` Output
When you run ps aux, you'll see several columns:
- USER: The owner of the process.
- PID: The unique Process ID.
- %CPU: CPU usage percentage.
- %MEM: Memory usage percentage.
- CMD: The command that started the process.
These details help you identify what's running and by whom.
PID and PPID Explained
Every process has a unique PID (Process ID). It's like a social security number for a process.
Many processes are started by other processes. The process that starts another is called its parent process. The child process will have a PPID (Parent Process ID) that matches the parent's PID.
This creates a process tree, showing how processes are related.
ps -o pid,ppid,cmd`top`: Real-time Monitoring
While ps gives a snapshot, top provides a dynamic, real-time view of your system's processes.
It continuously updates, showing CPU and memory usage, uptime, and a list of processes sorted by CPU usage (by default).
This is great for spotting processes consuming a lot of resources.
topNavigating `top`
top is interactive! Here are some basic keys:
- Press
qto quit. - Press
Mto sort processes by memory usage. - Press
Pto sort processes by CPU usage (default). - Press
kto "kill" a process (you'll need the PID).
Remember to be careful when using k!
`htop`: An Enhanced `top`
htop is an improved, interactive process viewer that's often preferred over top due to its user-friendliness.
It offers a more colorful and intuitive interface, making it easier to see CPU and memory usage visually.
You might need to install it first (e.g., sudo apt install htop on Debian/Ubuntu).
htopWhy Use `htop`?
htop provides several advantages:
- Visual Bars: Clear graphs for CPU, memory, and swap.
- Scrolling: Easily scroll horizontally and vertically.
- Mouse Support: Click to sort columns or select processes.
- Easy Filtering/Searching: Quickly find specific processes.
- Tree View: See process hierarchy clearly.
It's a powerful tool for monitoring system health.
Process Command Check
You've learned about ps, top, and htop. Let's see if you can distinguish their primary uses.
Processes: Snapshot vs. Real-time
Great job! You now understand how to monitor processes on Linux.
ps: Gives a static snapshot of processes. Useps auxorps -effor comprehensive lists.top: Provides a real-time, interactive view of processes, sorted by resource usage.htop: An enhanced, more user-friendly version oftopwith visual bars, mouse support, and easier navigation.
These tools are essential for any Linux user!
Häufig gestellte Fragen
Ist die Lektion „Prozesse verstehen: `ps`, `top`, `htop`“ kostenlos?
Ja — der vollständige Text von „Prozesse verstehen: `ps`, `top`, `htop`“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Linux Command Line Mastery-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Linux Command Line Mastery-Kurs umfasst insgesamt 4 Lektionen.
Was lerne ich in „Prozesse verstehen: `ps`, `top`, `htop`“?
Lernen Sie Befehle kennen, mit denen Sie aktive Prozesse auf Ihrem Linux-System anzeigen, überwachen und verstehen können. Du übst Linux Command Line Mastery mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.
Brauche ich Erfahrung, um Linux Command Line Mastery zu starten?
Keine Vorkenntnisse erforderlich. Linux Command Line Mastery auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 1 von 4.
Wie lange dauert die Lektion „Prozesse verstehen: `ps`, `top`, `htop`“?
Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.
Kann ich in dieser Linux Command Line Mastery-Lektion Code schreiben und ausführen?
Ja. Jede Linux Command Line Mastery-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.
Alle Lektionen in diesem Kurs
- Prozesse verstehen: `ps`, `top`, `htop`
- Prozesse verwalten: `kill`, `bg`, `fg`
- Systemressourcen überwachen: `df`, `du`, `free`
- Prozessprioritäten mit nice, renice und Signalen