Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dmitry-salnikov/ccea113c1d2b1d2ea77dbd16ddffb3c0 to your computer and use it in GitHub Desktop.
Save dmitry-salnikov/ccea113c1d2b1d2ea77dbd16ddffb3c0 to your computer and use it in GitHub Desktop.
top cheat sheet

top (the UNIX process inspector) cheat sheet

Navigating

  • Up and Down to scroll through processes one by one, or PageUp and PageDown for paged navigation.
  • Left and Right to navigate horizontally through fields (useful when displaying many).
  • C will show an index of where you are in the process list (eg 30/300 when your cursor is on process 30 and there are 300).

Sorting

  • Shift+P sort processes by CPU usage
  • Shift+M sort processes by memory usage
  • Shift+R reverse sort order
  • Sort on any field: Press f to bring up the Field Management menu. Select the field to sort on, press s and then Escape.

Other stuff

  • m switches memory views between the list of metrics and graph view.
  • k kill a process
  • d set the refresh rate (in seconds)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment