From the course: Linux Foundation Certified System Administrator (LFCS) Cert Prep

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Diagnose and manage processes

Diagnose and manage processes

- [Instructor] Whenever we launch a program, it lives as a so-called "process" on the operating system, that is, until it finishes its job or it's closed. For example, when we run a command such as ls, a short-lived process gets created. The process for ls displays a directory's content, and as soon as the job is finished, the process is closed. Other processes though, have a long life. The SSH daemon is a good example as it's usually running continuously on a Linux server. The commonly used command to inspect processes is ps, and ps is a bit weird because it supports two kinds of syntaxes for its options: -a in a command like ps -a uses the Unix syntax. In a command like ps a, however, the BSD syntax is used. And ps -a has an entirely different effect than ps a. The -a and a options are not equivalent. If we use ps without any options, we'll see a result like this. By default, ps will only show us processes launched in our current terminal window or session, but we're interested in…

Contents