1

Is there a searchable database of Linux commands? I'm new to the sport, and alot of information here assumes alot of knowledge I (and I'm sure many others) do not possess. However, I learn quickly, if I have a way to reference available commands.

Noam M
  • 451
NPM
  • 113
  • 1
    Try man man in your terminal. – eyoung100 Aug 10 '17 at 03:24
  • 1
    www.google.com is your friend. I would also recommend: https://www.gnu.org/software/bash/manual/bashref.html – jesse_b Aug 10 '17 at 03:24
  • 1
    You can also echo $PATH and then ls some of those directories as they contain most commands. For example: ls /usr/bin | less. If you see a command you are interested in man <command> or google it. To search for a command you can use the whereis command. This will show you both where the command is located and where it's man pages are located. – jesse_b Aug 10 '17 at 03:26
  • Try the apropos command in your terminal... with what you want to do, ie apropose editor or apropos network – ivanivan Aug 10 '17 at 04:33
  • apropos is AFAIK just an alias for man -k. – DopeGhoti Aug 10 '17 at 05:14
  • 1
    Google for "unix man pages", and you will get many repositories. My current favorite is http://man7.org/linux/man-pages. – Scott - Слава Україні Aug 10 '17 at 06:34

2 Answers2

6

There is indeed a searchable database of Linux commands, among other things. This database is called the "manual", and is divided into the following sections:

  1. User Commands
  2. System Calls
  3. C Library Functions
  4. Devices and Special Files
  5. File Formats and Conventions
  6. Games et. al.
  7. Miscellanea
  8. System Administration tools and Daemons

The command to search the manual is man followed by the command (or other entry) you want to read the manual page for. For example, to read the manual page for man, you would use the command man man.

For situations where the same entitiy exists in multiple sections (for example, printf, which has both a User Command and a C Library Function, you specifiy from which section of the manual you wish to read (e. g. man 1 printf).

You can also search the abstract of each entry in the manual with the apropos command, or by using man -k (for "keyword"). For example, on my system the results of man -k printf are:

asprintf (3)         - print to allocated string
caca_conio_cprintf (3caca) - The libcaca public header.
caca_conio_printf (3caca) - The libcaca public header.
caca_printf (3caca)  - libcaca canvas drawing
caca_vprintf (3caca) - libcaca canvas drawing
dprintf (3)          - formatted output conversion
fprintf (3)          - formatted output conversion
fwprintf (3)         - formatted wide-character output conversion
printf (1)           - format and print data
printf (3)           - formatted output conversion
snprintf (3)         - formatted output conversion
sprintf (3)          - formatted output conversion
swprintf (3)         - formatted wide-character output conversion
vasprintf (3)        - print to allocated string
vdprintf (3)         - formatted output conversion
vfprintf (3)         - formatted output conversion
vfwprintf (3)        - formatted wide-character output conversion
vprintf (3)          - formatted output conversion
vsnprintf (3)        - formatted output conversion
vsprintf (3)         - formatted output conversion
vswprintf (3)        - formatted wide-character output conversion
vwprintf (3)         - formatted wide-character output conversion
wprintf (3)          - formatted wide-character output conversion
XtAsprintf (3)       - memory management functions

The number in parens following each entry is the section of the manual for that particular entry. You can use -k to search both the name of the command itself (as with man -k printf), or to search the abstracts:

$ man -k 'formatted output'
dprintf (3)          - formatted output conversion
fprintf (3)          - formatted output conversion
printf (3)           - formatted output conversion
snprintf (3)         - formatted output conversion
sprintf (3)          - formatted output conversion
vdprintf (3)         - formatted output conversion
vfprintf (3)         - formatted output conversion
vprintf (3)          - formatted output conversion
vsnprintf (3)        - formatted output conversion
vsprintf (3)         - formatted output conversion
DopeGhoti
  • 76,081
3

Linux has thousands of commands available; I've been using Linux for years, and I regularly discover new commands and utils. And no, there isn't a complete database that lists all of them. The reason is that many are external command which are added from time to time.

However, this isn't an issue -- memorizing the name of thousands of commands is hardly useful. I recommend that you study a Bash guide, which will give you an understanding of the most common commands. Then you'll discover new ones as you move into uncharted territory.

man is an useful tool when you already know the command name and want to know what it does. If you want to know which command does a certain action, for instance "list files", man -k list will be more useful; it does a search on the whole text of the manpage. Another way is to do a Google search.

dr_
  • 29,602