voyeg3r / dotfiles

dotfiles for system config
GNU General Public License v3.0
14 stars 4 forks source link

How to display all possible commands on linux #87

Closed voyeg3r closed 8 years ago

voyeg3r commented 8 years ago

source: http://stackoverflow.com/questions/948008/linux-command-to-list-all-available-commands-and-aliases

You can use the bash(1) built-in compgen

compgen -c will list all the commands you could run.
compgen -a will list all the aliases you could run.
compgen -b will list all the built-ins you could run.
compgen -k will list all the keywords you could run.
compgen -A function will list all the functions you could run.
compgen -A function -abck will list all the above in one go.