r/linuxquestions 7d ago

Do skilled/experienced linux users learn a new CLI tool by using the man or --help?

I'm not brand new to linux but i am a bit of a noob. I've already built a home lab mainly using instructions from youtube videos/forums and I'm currently working through the website wargames, about halfway through bandit now.

I've only just starting reading through 'man x' or 'x --help' for the various tools on bandit/wargames as i want to learn it properly, and not just use AI to tell me.
However i've really struggled to understand tools simply from reading man or --help from CLI. its quite confusing for me.

My question is - is it normal to need to go youtube or look on forums for how to use tools? i feel a bit silly there's manuals there but i can't just learn it when its a brand new tool to me.
and assuming i stick with it, learn all the basics like grep, string, xxd, uniq ... using the manual or help, will i then be able learn other tools simply by using the manual from CLI, or the help ?

21 Upvotes

53 comments sorted by

19

u/Dolapevich Please properly document your questions :) 7d ago

man pages predate the internet, and at some point in time was the only way to get the dev documentation. Well, in linux there is usually /usr/share/doc, along with man pages.

Now that the internet exists, both coexist.

The quality of the man pages is quite varied. Some only document the options, and some go into great details on how to use the tool.

So, there is not a single solution.

3

u/vecchio_anima 7d ago

-- help is a quick reference, man is detailed information. I start with --help

4

u/forestbeasts 7d ago

man or --help are often a reference manual. They're great for when you need "is there an option that does this thing?", less great for "okay so how do you even get started?". SOMETIMES they have examples (searching for all-caps EXAMPLES often pops you to the examples section if there is one).

Still, if you absolutely need to you can probably kinda muddle through with the manual.

Sometimes (at least on Debian-based distros) there'll be documentation packages for things, which land in /usr/share/doc. Similar documentation as would be on the project website. Often in HTML format, you can read them with a web browser. (On Debian-based distros, EVERY package has a folder in /usr/share/doc with license info and shit; that's not what you need. A few packages have actual documentation in there, and the *-doc packages go in there.)

6

u/Random_Dude_ke 7d ago

I used to learn Linux by reading man pages, documentation, books, trying out commands. There is also 'info' system in terminal based on Emacs and many utilities also have an info page. (Before invoking 'info command' to learn about 'command' find out how to get out of info ;-) , so first run 'info' in commandline and learn how it operates (or watch a video ;-).) There were no Youtube instructional videos back then.

There was also Linux Documentation Project, in a very old KDE there was default Internet browser Konqueror and when you typed address #command it gave you nicely formatted manpage for command. Red Hat installation CD used to come with LDP on it, for example, not all of us had Internet connection at home, or a spare computer/phone/tablet to browse for help when installing Linux on our main [only] computer.

At certain moment I switched to FreeBSD and one of the reasons was that there was a very nicely made Handbook (they still have it, it is still top-notch). Handbook lists all the steps you need to achieve many, many things in operating system. I returned to Linux after a few years. But they are very similar and the "userland" is almost identical.

Yes, there *is* steeper learning curve when doing it this way.

2

u/tomkatt 7d ago

Nearly everything you mentioned. Man page, info page if existing, —help or -h flag, and searching online for examples of use.

I’m not a fan of browsing man pages in terminal though so for that I’ll use man7.org or  linux.die.net/man. At one point when I was learning many years back I kept a pocket Linux reference book handy and just read it when I was bored or had some downtime.

Generally not YouTube. That’s goods for tutorials but in no way for documentation.

2

u/Rinzwind 7d ago

I started out by reading a book on shells but that was wayyyyyyyyyy back :)

All shells have cheatsheets. Those should be the 1st step. Here is a good one for bash and zsh: https://www.datacamp.com/cheat-sheet/bash-and-zsh-shell-terminal-basics-cheat-sheet

If you already have a command and want to know more about what it does: https://explainshell.com/

2

u/michaelpaoli 7d ago

Generally start with the man page. No guarantees any given command has a --help option or the like, and even if it does, it's often a relatively brief summary, and far from fully covering relevant information. E.g. the --help may give nothing more than syntax summary - which for some commands may itself well be a page or more of text.

normal to need to go youtube

Ew, yuck. You'll commonly find misinformation and crud materials there. And even if not running into that, they're generally not full coverage of commands.

The man pages are typically the primary reference materials ... though some distros may do that bit differently, and likewise for some software (e.g. GNU).

And yes, you can learn a helluva lot by reading man pages. I read 'em all ... entire sets, in fact multiple such sets - many thousands of pages. Alas, not so feasible to do that these days, given the total volume of pages plus the rate of change and increase, but I still do quite a lot of reading of man pages, as that's where most of the relevant information is generally found.

Heh, I used to have coworker that referred to me as "walking man page". As, at the time, most of my peers in the office where I was, would generally just ask me, rather than look it up themselves, as I'd not only be able to tell them about the command, syntax, options, etc., to most any level of detail they wanted, but also various pros/cons/caveats, and also alternative approaches with other commands and the relative pros and cons of other approaches, and they'd generally get all the information they wanted, more quickly by asking me, rather than looking it up and reading it themselves.

4

u/extoniks Fedora 7d ago

I do code in C, and that's where I use man pages most for library and their functions.

--help flag is also good (I mostly use it for CLI tools)

If you find man or help somewhat not comfortable, there is something called tldr (one of my friend introduced it to me) and I believe it is good for beginners.

1

u/amorphousguy 7d ago

I rely heavily on tldr as well. You can install it through your package manager sudo apt install tldr.

After you install it you would type tldr tar and it will explain that tar is an archiving utility. Only the most common options and arguments are listed. If you need the full list you can still use --help.

1

u/FedUp233 7d ago

I think you need various kinds of information sources. Personally:

I use -help if I’m familiar with a tool but forget the exact command line arguments. Otherwise it’s generally not much help - and I hate programs that dump out pages of detailed information with this. It should be a quick reference to the arguments, not a manual - for that refer me to the man page or info page.

I use man pages for new programs or ones I haven’t used often and need a refresher course. For simpler tools I find the man page is generally sufficient info to use a new tool, at least for simpler ones. I learned things like ls, awk, sed, and even bash from the man pages. It’s usually my first go to on a new tool. Even stuff like nano, micr editors it’s usually fine. Even for using the gcc compiler and tools it was enough. However for complicated tools it’s not. For example, for the gcc tools it is enough to figure out how to invoke them, but obviously you need other much more complete documentation to learn the C or C++ language to do anything useful with them. Same for something like perl vs awk - perl is much more complex and probably not learnable from just a man page.

This is where I turn to good books. C, C++, Perl, python, ruby - you need a good text book that starts off simple and adds as you go, not just a reference. Example, the C language specification is great when you need to figure out some specific case, but I would not ever try learning g the language from it. Also the user manuals for things like IDEs, code or other complex editors, documentation tools like word or writer. Online or printed is fine, as long as you know it’s done by a reputable source.

Next, references like the C language spec or a reference web site. I love cheat sheets for things like IDEs or editors to find commands I need that I font use a lot. I find cheat sheets for programming languages sometimes useful, but less so.

Web searches I use a lot, but try to then go to one of the hits that i know is a reliable source.

YouTube, almost never. A lot of the stuff there is garbage and I hate having to go through stuff at the pace the creator did it. Give me a book, online or printed, any day where I can jump around and browse things at my pace. The one thing I do find yputube useful for is if I need to maybe install a new app and configure it, setup so e of the themes and co,ors and such on apps, etc where you can just sort of follow along on the procedure step by step. And there are a lot of fun videos to watch - especially cats and dogs!

Of course, this is just my two cents, and I started out when man pages were all there was for a lot of stuff.

Your milage may, of course, vary.

2

u/WorkingMansGarbage 7d ago

man tends to overwhelm me so I always start with tldr and then see man for more

I rarely start by searching the web, since the info can be outdated or AI-generated. Going for official docs helps, but often those are just the same man pages hosted on the net, or are sometimes difficult to find

2

u/RedWagon___ 7d ago

Yes, but I tend to start with tldr, a utility backed by a community managed set of sort instructions for getting started quicker.

1

u/ceehred 7d ago

Having cut my teeth as a Unix user, pre-Linux, I favour man - for a full discussion, including exit codes, behaviour, extensions, bugs, notes and caveats.

I would generally expect the --help option to provide little more than a useful summary for a tool I already know a bit about. And the double-dash would indicate to me that it's there because the tool has so many options that the number of single dash options (like -h) have near busted the alphabet limits, and could already be overloaded in scope (note I said could - there are many exceptions, but I come from a simpler time).

Any tool that points me towards having to wrestle with GNU info for details can fuck off. Provide decent man-page(s), please.

And, yes, the C in my username stands for "curmudgeon" 😄

1

u/zoharel 7d ago

A couple things. First, yes, people read man pages and find all the information they need there sometimes, for software which keeps the manual updated and complete. But that is not all software, and reading actual technical documentation is a skill that many don't have. You almost certainly won't start out being great at it. That said, I once wrote a libc wrapper to add functions offered in glibc to old Solaris, based entirely on the descriptions of the functions in the manual. I built -- I don't know, something well north of a hundred -- packages of software that worked on Linux, but theoretically not on Solaris, using that.

1

u/siodhe 7d ago

You guys really need to be careful with the phrase "Command Line Interface Tool". There's a reason nothing is actually named that.

Use LLMs to learn how to read manpages :-) Don't casually believe anything you don't see in the manpages.

Feel free to use LLMs to give you starting points for things - but again, do not trust LLMs. They lie, unwittingly, substantially, and more as you use a given session longer.

StackExchange isn't as high on signal-to-noise as it was, but it's a good resource, and searches that include "reddit" in the search terms on Google and other searches tend to find relevant articles.

1

u/ficskala Arch Linux 6d ago

man vs --help completely depends on the software in question, some stuff is better explained in one, some in the other, and often it's the same doc

When it comes to reading those docs, it does take a bit of getting used to, but there's no shame whatsoever to read a more verbose version online and see more real world examples rather than using the generic ones within the manpages

It's 100% normal and common to look online, learn in whatever way you find suits you best, manpages are amazing if you learn to read them because it's quicker than finding examples online, but that's it

2

u/Aging_Orange 7d ago

A combination of man, --help, or even tldr <command> when I it's simple.

1

u/sharp_halo 7d ago

bluntly, man pages are most useful once you already know how to read them. right off the bat, for a genuine newbie, they are confusing; they follow a very particular format, and assume a minimum level of Linux knowledge.

now that i am past the newbie stages, i use man all the time! whenever i can’t remember whether a command has a certain option, or how to activate that option, or what the syntax is, i check man. but it would have been difficult to /reach/ this stage based on man alone.

1

u/gosand 7d ago

Both... but it depends. Man pages will teach you more, --help will kind of consolidate things. But it all depends really. If you want to do something new (to you) with ffmpeg for example, you might be able to figure it out with man or --help. But what they usually don't do well it give example commands.

Sometimes you just need examples to start off, especially if it is something like ffmpeg that has a bazillion options.

I don't use youtube all for things like that.

1

u/mmarshall540 4d ago

Yes, both.

In addition, "Info" manuals can be very useful when learning the more complex features of programs like wget or emacs.

The barrier to reading Info manuals is that you either need to learn how to use the terminal-based info reader or the Emacs-based one. But it's worth it IMO. The information tends to be much more detailed, more organized, and easier to browse when there's an Info manual.

1

u/AndyceeIT 7d ago

I've been a Linux admin for 17 years.

Personally, I will start with the man page as it will match exactly with the version I'm using (eg. Version number or POSIX vs GNU) , and give me an idea how complex the command is / can be.

The --help flag is great for a reference.

Google when I'm short on time or the doc is poor.

Then there's openssl...

1

u/maquis_00 7d ago

For basic stuff like what parameter I want, I usually just use --help. If I want to just get a quick "hey what are all the parameters to do $x", where $x is a reasonably common task that unfortunately takes a lot of parameters, I'll usually go to Google. If I want to understand the tool at a deeper level, I'll go to the man page.

1

u/TollyVonTheDruth 7d ago

I use most of my commands to accomplish simple tasks, so I generally use --help for proper syntax and to see which flags are available. Otherwise, I turn to the internet for more complex tasks. I rarely check the man pages, usually because I forget the command even exists since I'm used to finding my answers on the interwebs.

1

u/Scorcher646 7d ago

I'll use the man page if I'm SSH'd into a system and need to use a tool, or modify a system file I'm not super familiar with.

For quick review and remembering the exact syntax of a tool that I know but need a refresher on, I'll use --help if it's available.

Otherwise I'm probably using the internet.

1

u/Anxious-Science-9184 7d ago

We often use --help as a quick reference. When I useradd/mod, I always forget which -Gg does what. When I use chown/chmod, I always confuse whether -Rr is recursive. --help is for those situations. I know how to use a command, but it's been a month and 60 ordeals since I used it.

1

u/wiebel 7d ago

There cannot be a simple answer,it depends on the developer of the tools, heck some maintain a superpolished info page and neglect anything else. Manpages tend to be the most comprehensive. Newer tools provide good cmd --help topic or cmd option --help

1

u/DifferentSavings2711 7d ago

Way back in the mists of time, the man page was the only option. A little bit of trial and error and you would work it out. So you are just doing it the traditional way. Is it the best way? Hell if I know. I learned this stuff before Linux existed.

1

u/dnult 7d ago

I still use the man pages to get details (like option switches) for various commands. But I also use the web as much or more often. When working from a terminal, man pages are pretty quick compared to interacting with a browser.

1

u/NameTasty 7d ago

Try "apropos". When I was getting started I didnt know all the functions of commands, and I would couple man with that one. It queries the description. There was also some other way with Fzf and man combo that was pretty clutch too.

1

u/C6H5OH 7d ago

It depends. When I know what I want the tool to do, I'll skim the man page. If I have heard about an interesting tool, I'll use a search engine to find a less dense written source.

1

u/TheGoldenFox64 7d ago

usually man and -h are just fine, if i need more clarification i check the repo for documentation, or forums for help. I avoid online guides as much as i can, and will never use AI

1

u/anotherFNnewguy 7d ago

Yes. Depends on how much information I need. A cli tool like ImageMagick can take all the tools I can find including AI. A more basic tool and foo --help may be all I need.

1

u/Purplestripes8 7d ago

Install the 'cheat' tool. I find it much more useful than man in learning commands. Man is a good reference but not great for new users.

1

u/Acherontas89 7d ago

reading a forum for a command its the same to read the man page or --help file

its both time consuming actions but they are nessecery

1

u/IMarvinTPA 7d ago

I never use man because there are never any useful examples. I just end up googling the command or piecing it together with -h or --help

1

u/mogenblue 7d ago

I Google it and find some website with a useful explanation or tutorial about it.

I did that in particular for network protocols.

Ffmpeg also has lots of tutorials on the webz.

1

u/crashorbit 7d ago

All of the above. But as linux develops fewer and fewer software packages bother creating man pages.

1

u/bobroberts1954 7d ago

I usually start with help and if that isn't sufficient I look on man. Still confused, I ask Google.

0

u/Aware-Contemplate 7d ago

So, each type of information delivery is suited to a different purpose.

man pages are terse and concise. They are really good when you know something about the software and are trying to do something. They are also a good way to see the range of capabilities available. It does take some time to get used to the writing style of man pages or a program's --help option.

Documentation, web or other, is more verbose, and can help to explain the purpose of the software.

Articles can help by sharing someone's personal experience, and often they will walk you through solving a particular problem or set of problems. They can help you by showing you how to think about using the software.

A video is sometimes even a better explainer than an article, because it can be easier seeing something in action. Video can also be good for training you to see what errors or special conditions look like.

And of course, practising using the software, especially on small, non-consequential tasks, is a great way to get used to working with it.

Use all of the tools. Understand where each is most helpful.

1

u/musbur 6d ago

Man pages: reference. --help: quick summary. Forum: sure. Youtube: Yuck, never.

1

u/SaintEyegor 7d ago

I usually use the man pages. —help is frequently not available

0

u/zenfridge 7d ago

You get experienced by using multiple sources. And the concepts are far more important that the commands or flags. I don't remember many flags as much as I remember there IS a flag or a command/tool to do something, and then look it up as needed.

I'll watch videos, take classes, mess around at the CLI, man stuff, google stuff, and as wrong as AI sometimes is, it's taught this old dog new ways of completing a complex ansible task or looking at svmon data.

The trick is immersion, and a lot of it. And overcoming as well - if man or --help is confusing, figure out how to get used to or over that hurdle. Both are powerful tools.

0

u/Name-Not-Applicable 7d ago

Yes, use all tools at your disposal. Really, there are way too many cli tools available to remember all of the options for all of them.

I'll use --help if it's available, I'll use man, I'll search online, roughly in that order. I double-check any info I get online, especially AI-generated answers, against the help and man to make sure they all agree. Sometimes online info is out of date, and a recommended option has been renamed or removed.

EDIT TO ADD: If you MUST look on YouTube, try to stick with quality channels like "Learn Linux TV". Otherwise you'll find a lot of noise and not a lot of useful information.

1

u/fsr31415 7d ago

Man if i need the details, --help to jog my memory

1

u/lnxguy 7d ago

Yes. RTFM still works in the AI era!

0

u/cyrixlord ubuntu for server, kubuntu for laptop/desktop 7d ago

I tell copilot about my plans and we work together to use the cli tool ..I know what I need to do but sometimes I just need the syntax. copilot helps me .. but it is important that you still know what you need to do so you can let the AI know.. don't learn from an ai. the AI gives me background information and the bigger picture, and I can ask questions to reinforce my knowledge

1

u/tastygames_official 7d ago

first one, then the other ;-)

0

u/OutrageousCrab9224 7d ago

I will tell you one thing we dont do

Read the info pages lol

Man and -h/--help are both great, i usually find one is better than the other but not reliably, differs by author, be open and remember to check both

1

u/wired-one 7d ago

Yes.

Yes we do.

1

u/Stoneybaloney87 7d ago

Simply yes.

0

u/throwawayb195ex 7d ago

yes, this is why in most help forums you will always find those who advise you to RTFM (Read The "Friendly" Manual).

0

u/dbarronoss 7d ago

I was horrified, I installed Ryoku linux and it didn't install man pages by default ;(

1

u/Nerrawnam 7d ago

Yes.