Skip to content

Instantly share code, notes, and snippets.

@schaternik
Last active July 6, 2021 07:55
Show Gist options
  • Save schaternik/a72f99533d5a608d2adc to your computer and use it in GitHub Desktop.
Save schaternik/a72f99533d5a608d2adc to your computer and use it in GitHub Desktop.
Linux: where vs whereis vs which vs whatis

whatis

  • whatis - display one-line manual page descriptions
  • whatis -w 'ab*' - search using wildcards
  • whatis -r '^ab' - search using regexps

whereis

  • whereis - locate the binary, source, and manual page files for a command
  • whereis -b vagrant - locate binary
  • whereis -m vagrant - locate man pages
  • whereis -s vagrant - locate source

which

  • which - locate a command(executables)
  • which -a echo - all

locate

  • find files by name very fast

find

  • search for files in a directory hierarchy (with specific criteria)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment