Whats your preferred method for lear ing or looking up commands?

I dont enjoy web searching every time. Id like to just have some sort of document I can read or search to find certain commands.

I do have the man pages on kiwix but is a little complex to navigate. Like if I want to learn how grep works, what's the best way. Or if I forgot lshw, how do you go about looking up a command that does a certain thing like list out hardware etc.

Showing examples would be super helpful too, like "here's a typical dd command for a drive image clone"

Preferably a desktop/android app or something that helps with this would be nice.

24 points · 14 comments · view on lemmy.world

14 Comments

SethranKada@lemmy.ca · 12 pts · 317d (1 reply)

I use tldr myself, but it's just an easier to read version of man pages, so it doesn't directly help with what your asking for. Sorry

vk6flab@lemmy.radio · 6 pts · 317d (2 replies)

The commands man and apropos are your friends to get you started.

Learning how to use specific tools like grep, sed and awk is a case of getting started by using them. Most of the subsequent learning process will focus around how to create regular expressions (regex), for which there's also a manpage.

The "typical example" for a dd command is like saying, "here's a great way to shoot yourself in the foot". A better way is to understand that most of these tools follow the UNIX philosophy:

  1. Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new "features".
  2. Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don't insist on interactive input.
  3. Design and build software, even operating systems, to be tried early, ideally within weeks. Don't hesitate to throw away the clumsy parts and rebuild them.
  4. Use tools in preference to unskilled help to lighten a programming task, even if you have to detour to build the tools and expect to throw some of them out after you've finished using them.

Once you "grok" that, you'll be in a much better place.

lka1988@lemmy.dbzer0.com · 5 pts · 317d (1 reply)

I'm also a fan of tldr.

sed is starting to click for me, which is nice, only took 10 years.

vk6flab@lemmy.radio · 1 pts · 317d

Wait until you get your head around awk 😇

lka1988@lemmy.dbzer0.com · 6 pts · 317d (1 reply)

I collect things and put them in my personal notes for reference later.

Naturally, I end up googling it anyway.

spacelord@sh.itjust.works · 1 pts · 316d

⬆️ 😅

strlcpy@lemmy.sdf.org · 3 pts · 317d

man, but preferably BSD ones. They're terrific. It pays to get comfortable with the pager (man less), but for web rendering, https://man.openbsd.org/ is great. I don't know why these other man sites use monospace fonts, the language man pages are written in was literally made for quality typesetting!

frongt@lemmy.zip · 2 pts · 317d

Either the manual or I google it, honestly.

SoftestSapphic@lemmy.world · 1 pts · 316d

Commands that are too long to memorize I have a .txt I can copy/paste from

masterofn001@lemmy.ca · 1 pts · 317d

Does nobody use info?

So much more in depth than any manpage.

Granted it doesn't contain every app installed, but it gives very detailed and very verbose explanations, examplea, options, use cases, caveats, warnings, etc, for all of the most essential commands and functions

$ info

In the program these are basic commands :

-I # sets searching to always case insensitive -very necessary (upper case I)
/ # search for pattern
n # search forward
N # search back

You can also search from command line using

Info -k [pattern]
muntedcrocodile@hilariouschaos.com · 1 pts · 317d

Dr GPT

jutty@blendit.bsd.cafe · 1 pts · 317d

I wrote a small script that takes a query as its single argument and if it finds a matching filename in a given directory it shows that in a pager. If it doesn't, it uses ripgrep to search inside that directory and returns the filenames in a picker. If I prepend the filename with e, it opens that file (either existing or new) in an editor. Then I track that directory with Git.

This way I have a quick way to store, find and retrieve notes from the terminal itself.

sga@piefed.social · 1 pts · 316d
[ removed ]
highball@lemmy.world · 1 pts · 315d

eg although I usually forget to use it and just go with manpages.

I have several decades of using manpages, so you can understand the manpage reflex. If you don't have that manpage muscle memory, I'd say give eg a shot.

jesale@lemmy.zip · 0 pts · 317d
[ removed ]