There's a really great package that I love called [`command-not-found`][1]. When you type unknown commands, it searches through apt and suggests packages to install. [It has worked in Raspberry Pi before.][2]

However if you try it now…

    # sudo apt-get install command-not-found
       (…package is installed…)
    # sudo update-command-not-found
       (finishes in <half-second)
    # echo $?
    0
    # aoeuaoeuaoeu
    Could not find the database of available applications, run update-command-not-found as root to fix this
    aoeuaoeuaoeu: command not found
    #

  [1]: https://packages.debian.org/stretch/command-not-found
  [2]: http://www.goliatone.com/blog/2015/03/05/raspberry-pi-command-not-found/