As a Unix beginner, I often find myself wanting to know the name of the command that achieves a particular function I'm after. How can I go about finding out the name of the command, given a description of what it does?


A good starting point, if you don't know the exact command name, is apropos. You'll find a short description here or with man apropos.

| improve this answer | |
  • 1
    On my Ubuntu box, apropos ls returns 329 entries, which is much more then I expected. I found that apropos --exact ls gave me a more concise list (2 entries). – Stefan Lasiewski Oct 21 '10 at 20:25

In addition to apropos (which can also be written man -k), a useful command is man -K key_word (capital K). This searches for a man page with the 'key_word' anywhere in the man page (man -k searches only in the short description part). Either way, the result are shown with the section between brackets:

[gojan@Gonux ~]$ man -K copy
cp (1)               - copy files and directories
cp (1p)              - copy files

You can use this number to avoid ambiguity like:

[gojan@Gonux ~]$ man 1 cp
CP(1)                                                         User Commands                                                         CP(1)

       cp - copy files and directories
[gojan@Gonux ~]$ man 1p cp
CP(1P)                                                  POSIX Programmer's Manual                                                  CP(1P)

       This  manual  page  is  part of the POSIX Programmer's Manual.  The Linux implementation of this interface may differ (consult the
       corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
  • man -k is a synonym of apropos. – Gilles 'SO- stop being evil' Apr 4 '11 at 19:27
  • Ups, you are right. I misspelling the '-k'. This is the correct command man -K. Thanks – Bruno Berisso Apr 5 '11 at 14:32
  • +1 for discovering that apropos is man -k and discovering that man -K is a more powerful apropos (more powerful because it searches the entire command description). – Trevor Boyd Smith Jun 7 '11 at 20:34
man intro

is the unix way of answering this question.

| improve this answer | |

If you want to list all possible commands try hitting <Tab> twice

| improve this answer | |
  • I don't want a list of every possible command that doesn't tell me squat about what they're for. – Zaid Oct 21 '10 at 15:20
  • @Zaid , I'm sure that wasn't what you were looking for, but Ayush's question does give you a "List of *nix terminal commands", per the Subject. – Stefan Lasiewski Oct 21 '10 at 20:27

You might want to print out or bookmark a cheat sheet. I like this one which is the first result on the Google search for "unix cheat sheet" for a reason.

| improve this answer | |

To be honest, I find myself in the same situation that you are quite often. Even though I'm not a beginner.

But knowing which tool does what is, is something that will haunt you forever, especially, since new tools are coming in quite fast, are Distro dependent, and the UI changes sometimes from version to version (as with tar, that changed the meaning of the -J switch recently).

Here's what I'm doing:

  1. I use Fedora, which uses RPM for package management. Suppose I'm looking for a tool that helps me edit ID3-Tags. I'd just use: yum find ID3.
  2. In case I don't find what I'm looking for, I'd consult Wikipedia. It sounds lazy and strange, but it's really quite reliable: http://en.wikipedia.org/wiki/Tag_editor#List_of_tag_editors
  3. Now, when I know what I'm basically looking for, but can't find the tool that suits me or the functionality in question (i.e. details, or comparison), I'd ask around on IRC or even here.
| improve this answer | |
  • +1 for the suggestion to use the system package manager's search function. Debianish distros like ubuntu, mint, etc. provide aptitude search ~d${regex} to search package descriptions. Also, googling linux TOPIC or e.g. ubuntu TOPIC is frequently enough to get a hint. – intuited Apr 4 '11 at 3:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.