I would like to make more use of the terminal. Is there a command I can use that could list for me all the available command of the Mac OS? I am using Snow Leopard.
4 Answers
You can hold the esc button for a few seconds (or press it or tab twice in succession). That will list everything executable in the path as well as all shell functions.
Also check out this question: Got any tips or tricks for Terminal in Mac OS X?.
This is a good introduction: Introduction to the OS X Unix Command Line.
If you type apropos .*
, you will get a nice list of command and descriptions.
-
thanks for the answer. But I am curious, why is holding the esc button for a few seconds displays all the commands (all 1979 of them:), isn't it an odd way to show them?– iddoberCommented Apr 22, 2011 at 14:46
-
1Its a form of autocompletion. Similar to if you press any letter and then hold esc it will show you all the command starting with that letter. You can also type apropos .* and it will give you a nice list ;) Commented Apr 22, 2011 at 14:50
-
-
Instead of holding Esc, you can just press it, or Tab, twice. Commented Apr 22, 2011 at 20:57
-
I suggest you to read a command line introduction from Apple: "Command Line Primer"
One way to find new commands is via manual pages.
For example man cd
will take you to the man page on the cd
command.
At the bottom of the manual page is a "see also" section.
I came across a site recently that has a good list of commands:
A few very interesting commands listed there that I had never seen before (though not documented only, use man *commandname*
locally if necessary):
dsenableroot
dot_clean
kextfind
, and
security
Many of the commands listed on the site are not OS X specific, but a few gems in there are, including the above.