Working with processes
This section serves as a practical guide to managing processes via resourceful command-line utilities that are used in everyday Linux administration tasks. Some of these tools were mentioned in previous sections (for example, ps and top) when we covered specific process internals. Here, we will summon most of the knowledge we’ve gathered so far and take it for a real-world spin by covering some hands-on examples.
Let’s start with the ps command – the Linux process explorer.
Using the ps command
We described the ps command and its syntax in the Anatomy of a process section. The following command displays a selection of the current processes running in the system:
ps -e | head
The -e option (or -A) selects all the processes in the system. The head pipe invocation displays only the first few lines (10 by default):
Figure 5.8 – Displaying the first few processes
The preceding information may...