0

I am new here, so thanks for accepting me.

Ok, so I have a really dum question, sorry, I am presently still learning.

So what if, I had no idea of what commands are available for a specific task or process, where would I look, ?? I mean say I did not know any commands, I wanted to find all the commands that might be appropriate for a specific task or process, how can I find these ??

All of my studying so far just covers the Man or Help commands, so that assumes I already know the command, but what if I don't, ??

For a simple example, if I wanted to Cut and Paste a file, is there anywhere I could type in 'Cut and Paste' and that would give me answers like mv, cp, rm, I could then look up using Help or Man, ??

I hope this makes sense, please forgive me, if not.

Kind regards and thanks in advance

  • 4
    The man command takes -k which uses the word after as a keyword search. i.e., see man man for an explanation. But I personally turn to Google if I am not looking for a command, but some kind of description of a task, with either "ubuntu" or "linux" as a search term. Yeah...so, I use Google. Not sure what others would use. – Ray Mar 08 '22 at 14:12
  • 1
    See Command to search through manuals? (although it likely won't help in this specific case, since "cut and paste" is a GUI concept that has no direct analogy in the CLI) – steeldriver Mar 08 '22 at 14:14

1 Answers1

2

The command apropos allows to find the name of commands related to a certain keyword.

For example, the command

apropos directory

will give a list of commands related to directory manipulation, along with a short one-line description of what the command does. Once you located a command of interest, you can learn how it works with man. e.g , the command above includes an entry

mkdir (2)            - create a directory

so if that was what you wanted to do, you can learn about the command with

man mkdir

The command man -k directory would be fully equivalent to the apropos command presented above. If you think whatis is easier to remember than apropos (with its French flavour), you can use that.

vanadium
  • 88,010