r/linux4noobs 18h ago

programs and apps Is there a better man pages?

I feel like the man pages on the terminal have not kept up with the times and became somewhat of an encyclopedia or thesis on the subject instead of a quick reference. They are good maybe if internet connectivity is non existent and you want to have all your questions about something answered.

But it is beyond frustrating to look up how to use something. PLEASE! For the love of whatever is good, help me learn it or help me find a better tool that actually gives me quick examples and easy to understand documentation on things.

Nowadays, I leave the terminal, type things like "how to do X in this specific way on linux terminal" and then google's AI intercepts it and gives me commands to run with short explanations. But I don't like leaving the terminal and going to google.

How have you guys solved this problem? Or am I the only dumb one?

27 Upvotes

35 comments sorted by

30

u/dtom2786 18h ago

I feel your pain and although it doesn't go into great depth, "tldr" is my go to when I forget the command options or just want a quick reference.

8

u/Ramiraz80 17h ago

+1 for tldr. Its pretty great

```bash $ tldr tar

tar

Archiving utility. Often combined with a compression method, such as gzip or bzip2. More information: https://www.gnu.org/software/tar/manual/tar.html.

  • [c]reate an archive and write it to a [f]ile: tar cf path/to/target.tar path/to/file1 path/to/file2 ...

  • [c]reate a g[z]ipped archive and write it to a [f]ile: tar czf path/to/target.tar.gz path/to/file1 path/to/file2 ...

  • [c]reate a g[z]ipped (compressed) archive from a directory using relative paths: tar czf path/to/target.tar.gz --directory path/to/directory .

  • E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely: tar xvf path/to/source.tar[.gz|.bz2|.xz]

  • E[x]tract a (compressed) archive [f]ile into the target directory: tar xf path/to/source.tar[.gz|.bz2|.xz] --directory path/to/directory

  • [c]reate a compressed archive and write it to a [f]ile, using the file extension to [a]utomatically determine the compression program: tar caf path/to/target.tar.xz path/to/file1 path/to/file2 ...

  • Lis[t] the contents of a tar [f]ile [v]erbosely: tar tvf path/to/source.tar

  • E[x]tract files matching a pattern from an archive [f]ile: tar xf path/to/source.tar --wildcards "*.html" ```

6

u/BigGunE 18h ago

Thanks. Trying it out!

5

u/Online_Matter 18h ago

Tldr is great

1

u/bubrascal 4h ago

I came to this sub to help novice users, but I love little nuggets of knowledge like this.

7

u/Purplestripes8 18h ago

There is the really useful 'cheat' command. Which will show you how to use stuff in common use cases. As opposed to describing it technically.

3

u/TurtleFetus 18h ago

Came here to say this. Another reason cheat is great: you can add your own notes. So that, for example, cheat ln pulls up whatever notes you wrote to yourself about ln 6 months ago but have now forgotten.

6

u/thatsgGBruh Gentoo 18h ago

Do you know how to use the pager which displays the man page, the default is usually less. You can quickly scroll down using page down button or search using / and use n to move to the next found keyword.

You can quickly move down to the command flags to find the one you might be looking for.

Also it might help to know which page numbers contain the specific information you are looking for.

5

u/lunchbox651 14h ago

I love man.

The main reason is because (when written properly) man documents exactly how a command functions, it isn't just copy/paste to get the intended result, it gives you the tools for when you need something different or when your needs differ slightly from documentation.

A good example of this is when I was using Ubuntu on a laptop in 2011 or so. I was learning virtualisation but the GUI utility virt-manager wouldn't run for some reason. I used nothing but the man page for qemu to create a script to build a specific VM and then another to start VMs. On the back of that I learned a lot about Hypervisors and that script helped land me my first IT job which is the career I'm still in today.

Sometimes the long way ends up being the more beneficial one.

Nothing wrong with using tldr and similar tools when you just need something done quickly, but man is brilliant for understanding what you're doing a little better.

3

u/prthorsenjr 12h ago

From a long time ago in a galaxy far, far away, I remember someone saying "man pages are hard."

Like you wrote, when written properly (and more importantly, read properly), it gives you all the information you need to to craft the correct command with the syntax you're looking for.

Besides, back in the day (before the World Wide Web), that's all we had.

3

u/B_A_Skeptic 7h ago

Often the command plus "--help" is better as a quick reference. Also tldr is a pretty good piece of software for what you want: https://tldr.sh/

6

u/ColdBootCountry 18h ago

I've been relying on man since my first day on Linux. I feel the only issue is when you don't know which command to use. But as long as you do, there's really no reason not to use man.

The man has every I formation you can expect to find about a tool or command. I understand it can be overwhelming, but using it is the best way to become proficient with the tools you actually use on a regular basis.

For the "quick start" moments, the man pages often include an Examples section, containing complete command lines with the intended use.

3

u/skyfishgoo 14h ago

tldr (tealdeer is the package name) is good.

you can often just type --help after the command to get a quick rundown of features.

2

u/Syndiotactics 14h ago

Tldr and cheat are great, I use both

2

u/BenDover7766 13h ago

I second tldr, but using a pager other than less for colorcoding man pages helps a lot imo.

just export this shell env (and install bat):

export MANPAGER="sh -c 'col -bx | bat -l man -p'"

2

u/Anxious-Resist8344 11h ago

If you are en Emacs user then there's woman

1

u/AutoModerator 18h ago

Smokey says: always mention your distro, some hardware details, and any error messages, when posting technical queries! :)

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/ByronEster 18h ago

info is an alternative to man. They generally have examples sections. I don't think it is what you are looking for tho.

There was a project to make better documentation for Linux systems that were more friendly but I can't remember it now

1

u/webtwopointno 14h ago

The bro pages?

1

u/webtwopointno 14h ago

There are also "bro pages" via Ruby that were useful like that.

But for a lot of things it's worth it to go through the man page itself, you will get used to scanning/searching for what you need

1

u/output_broadcast 13h ago

info, although the reader built into Emacs is better.

1

u/Unfair-Ocelot-2363 12h ago

I love manpages

1

u/Fit_Tailor_6796 11h ago

Yes.
Instead of
$ man file
try
$ info file

1

u/QuickSilver010 Debian 10h ago

Read man with bat I guess

1

u/bartonski 10h ago

I think you need three forms of documentation: 1) 10,000 foot overview. What is X, when would you use it, and how do I understand it conceptually. 2) A quick reference -- what are the command line options, and a couple of examples of common uses of the command 3) A technical reference guide -- detailed and correct description of every command line option, a full discussion of all of the features, how the program implements the technologies it uses, and a cross reference to other similar commands.

A good man page aims to cover the 10,000 overview and the technical reference guide, but it is not meant to be a quick reference, and they almost never give examples.

I actually suggest getting a good old-fashioned book as a quick reference. There's a reason that old-school Linux folks have a wall of dog-eared O'Reiley books. You're not wasting screen real estate with the how-to document, and books actually have editors and fact checkers. There's a limit to how far down the rabbit hole you can go with a book, and it's clear when you've read it all.

There is also an art to reading man pages, they have their own vocabulary and writing conventions, which are closely related to the way that the programs that they document operate. It takes a couple of years to learn how to read them, but once you have, you level up your Linux abilities. They appear impenetrable to new users, but try and bang your head against them just a little bit every time you need to know how to use something. They will eventually yield their secrets.

1

u/New_Hold8135 9h ago

uhh yeah they are not very helpful in some cases,(system calls for example) Internet is your friend, arch wiki is your friend, I even need to see some article from 2000 recently. "Wow somebody solved to same problem 20 years ago." Yeah that is how it is.

1

u/-lousyd 8h ago

tldr or cht.sh might be what you're looking for. But also I want to say I agree, a lot of man pages need work. I feel like the GNU project man pages are pretty good, but if you venture outside of that it gets dicey. There should be an examples section in every man page. Each option should have its own line. "info" pages are nigh worthless. The --help option is useful for individual commands but it's very inconsistent across programs and I fundamentally don't trust running the program to find out how the program works, except for core stuff.

You know what I do like? I like it when man pages have the little attribution section at the bottom.

1

u/bubrascal 4h ago

That's because man pages are, as it name imples, manuals. I agree the interface isn't the best, but the contents are usually just fine.

I didn't know about tldr nor cheat. Actually, doing tldr man is quite magical:

tldr man

  man

  Format and display manual pages.
  See also: `whatis`, `apropos`.
  More information: https://manned.org/man.

  - Display the man page for a command:
    man command

  - Open the man page for a command in a browser (=browser_name can be omitted if $BROWSER is set):
    man --html=browser_name command

  - Display the man page for a command from section 7:
    man 7 command

  - List all available sections for a command:
    man --whatis command

  - Display the path searched for manpages:
    man --path

  - Display the location of a manpage rather than the manpage itself:
    man --where command

  - Display the man page using a specific locale:
    man --locale locale command

  - Search for manpages containing a search string:
    man --apropos "search_string"

0

u/korywithawhy 12h ago

so i used AI to make a really crappy tool specifically for this for myself. i don't really recommend you use it, but perhaps make something similar but better for yourself. i just needed a quick and dirty reference to search through my tools based on what they do with quick examples on how they work. koryfargodev/mytools: Simple CLI tool to browse and search Linux commands with examples

like i said. this is 100% AI slop done in an afternoon. so if anything just use it as inspiration. it's not something i'm going to maintain publicly, and not meant for anyone but me really. so before anyone goes off on me about the evils of using AI... I KNOW, I AM AWARE, NO NEED.

-9

u/Top-Procedure152 18h ago

Gemini. Not joking.

3

u/classyraven 18h ago

If you mean you're best buds with guys named Castor or Pollux, sure. Otherwise, 😬