Managing Processes and Jobs

Learn how to manage processes and jobs.

The ps command

The ps command, short for “process status,” shows us the running processes on the computer, as well as information about who’s running them. It’s good for finding out what’s currently running and for identifying a process ID with a program so we can stop it.

The ps command takes different options based on which OS we’re using. In this course, we’ll cover the Linux options, which also work on macOS.

When we execute the ps command without any arguments, we see the processes running in our current session:

ps
Terminal 1
Terminal
Loading...

The output shows the PID, or “process ID,” the terminal session that’s running the command, how long it’s been running, and the command itself. In this case, the only results we see are the Bash shell itself and the ps command we just ran since it’s only showing us what’s running in this particular session.

The -f flag

We use the -f flag to get a more detailed output:

ps -f
...