Today I Learned

A Hashrocket project

Customizing the output of `ps`

There's a lot to know about processes, although typically we're looking for a mapping of pids to commands.

You can customize the output of ps with -o. The -o flag expects a comma separated list of keywords which indicate the columns that you'd like to display for each process.

> ps -o pid,command

The above command shows only the pid and the command w/args for each process. You can see all the possible keywords with ps -L.