How to list all existing commands in the system

Who has not ever wanted to know all the commands that exist in our system?

Well, here is another one who had this curiosity… and as is logical since I like to share, I share with you how to list all the commands available in the system 

compgen -c

Ok, this will do 

In the terminal all the available commands will be shown, if you wish you can save these commands in a text file to review it calmly:

compgen -c >> comandos.txt

Like, you can see with the parameter -a all alias:

compgen -c

Well… this is something extremely simple, but I hope it is useful to you 

regards

PD: See compgen help (help compgen) for more options.


Add as preferred source in Google