Search⌘ K
AI Features

Managing Processes and Jobs

Explore how to use the ps command to view running processes, understand process IDs, user ownership, and resource usage. Learn to filter and format process lists using various ps flags. Discover the top command for real-time system monitoring and customizing output fields. This lesson helps you effectively manage and optimize programs and processes on your system.

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
...