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 one more who had this curiosity ... and of course I like to share, I share how to list all the commands available in the system 😉

compgen -c

Ready, this will be enough 😀

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

Anyway ... this is something extremely simple, but I hope it will be useful for you 😉

regards

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


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

34 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   kernel panic said

    Thank you, it was very useful.

  2.   Atheyus said

    compgen -c | more

    😉

    1.    KZKG ^ Gaara said

      Yes true, you could still use less:
      compgen -c | less

      : )

      1.    Atheyus said

        Alphabetically:

        compgen -c | sort | less

        😀

  3.   ChepeV said

    O_o 3018 commands

    1.    Atheyus said

      compgen -c | wc -l

      3212

      : )

      1.    sieg84 said

        compgen -c | wc -l

        5191

        1.    KZKG ^ Gaara said

          compgen -c | wc -l
          3346

          1.    elav said

            compgen -c | wc -l
            2824

          2.    Scalibur said

            compgen -c | wc -l

            2558

            1.    KZKG ^ Gaara said

              By the way now that I see your email ... if you want (for example): scalibur@user.fromlinux.net it's all yours 🙂


          3.    Stif said

            compgen -c | wc -l
            2957

            :3

        2.    sieg84 said

          compgen -c | wc -l
          4004
          on Fedora 18 Just installed

          1.    dhunter said

            Woo that is high ... I have 2869 in the kubuntu of work, and that is the gadget.

        3.    socratesdz said

          compgen -c | wc -l
          23367

          … I think I have too many things: p

  4.   Scalibur said

    I accept! ... how is it done?

    PS: why can't I reply to some comments from admins? .. ee

    1.    KZKG ^ Gaara said

      I contact you by email 😀
      And it is not that you cannot respond to certain comments, but simply the maximum number of nested comments is reached (5 if I remember correctly) and voila, so that the comment appears at the bottom, give answer to the last one that you leave and that's it

  5.   Leo said

    It would be nice if you could also make a small MAN summary for each command, even in English, because most of them don't know why they exist and I'm not going to guggle one by one.

  6.   Blaire pascal said

    It would be interesting to go through all the man pages of all the commands with a single command and pass them to pdf as in an old post.

    1.    Atheyus said

      Not all commands have man, but if you still want it

      http://paste.desdelinux.net/4712

      : )

      1.    Leo said

        Thank you!! I'm testing it, a little slow but it seems to work.
        And you were right, I am getting several commands in the terminal that have no man but it doesn't matter.
        THANK YOU SO MUCH 😀

        1.    Leo said

          Works 10 🙂 🙂

      2.    Blaire pascal said

        Ahhhh fuck, now I do have something to read in my spare time. Thank you very much for your answer 😀

        1.    Atheyus said

          Man's pdf's are created without content, all of these weigh 2,2 kb, so we can easily delete them with

          http://paste.desdelinux.net/4715

          Run it when you finish creating the pdf's

          To erase the gaps

          regards

  7.   cryotope said

    Very useful and interesting. But I wonder, are they just internal bash commands?
    I ask this because there are no commands like cancel in the list (it is used to delete the job queue that is sent to the printer).

  8.   manolox said

    Easier still.
    We open a terminal and press the «TAB» key twice.

    Result (In my case): Display all 1530 possibilities? (and or n)

    If we do it as root user, it will also show us all the exclusive root commands.
    In my case: Display all 1821 possibilities? (and or n)

  9.   mabm1peace said

    LINUX -> IS THE MAXIMUM UNION IN THE WORLD

  10.   mabm1peace said

    IF ALL THE DISTRIBUTIONS OF «LINUX» IN THE WORLD COME TOGETHER TO REMOVE A SINGLE POWERFUL LINUX, IT WOULD FAIL THE IMPERIALIST DOMAIN OF MICROSOFT AND THE VIRUSES WILL DIE IT WILL BE FULL FREEDOM IN THE COMPUTER ...
    God United with Good Positive Purpose Nobody Lo My Sold

    1.    Nestor said

      @ mabm1paz: all distributions join? Better not, thank you. Diversity and competition is precisely what has allowed Linux to reach its current quality, and it will surely continue to improve.

  11.   semproms said

    I just tried it and I have found several commands that I did not know they were but that are quite curious, one of them is the snake, it appears by simply typing snake, another is a kind of written role-playing game (in English), write battlestar, it is curious.

  12.   truko22 said

    Very interesting thanks 😀

  13.   b1tblu3 said

    compgen -c | wc -l
    2676

    With double tab
    Display all 2636 possibilities? (and or n)

  14.   Angel_Le_Blanc said

    3811

    Use Arch and OpenBox, I do not understand, better return to Ubuntu, ok, XD no

  15.   Ramiro Estigarribia said

    It is not the same as pressing:
    Tab 2 times?