Terminal Command – How to List Available App Commands in Terminal

commandterminal

I'm using fluxbox and recently i wanted to start an application for video editing and i couldn't remember it's name. I usually run apps from terminal so I was wondering is there a way to list all (applications or) app specific commands like Xmonad's "run or raise" feature?
This feature can be seen here at 1:14 : http://www.youtube.com/watch?v=AyNkBLhIpQk&feature=related

Edit : I want to te able to type a command in terminal that will return the list of all applications installed (the list of all application commands available e.g. shotwell, gedit, gvim, vim, vi, firefox, chromium-browser etc.) basically i want to know which apps I can run (which apps i have)

Best Answer

If you're using bash(1), you can use the compgen builtin:

$ compgen -abc -A function

-a for aliases, -b for builtins, -c for commands and -A function for shell functions. You can choose which if these you want to exclude, as you'll get a rather large list (on my system I get 3206 commands).

The compgen command is meant for generating command line completion candidates, but can be used for this purpose too.