I've always approached learning Linux by just diving into it and bashing my head against problems as they come until I either solve them or give up, the latter being the more common outcome.
I wouldn't take this approach with other pieces of software though - I'd read guides, best practices, have someone recommend me good utility tools or extensions to install, which shortcuts to use or what kind of file hierarchy to use, etc.
For example, for python I'd always recommend the "Automate the boring stuff with Python", I remember learning most Java with that "Head first Java" book back in the days, c# has really good official guides for all concepts, libraries, patterns, etc.
So... lemme try that with Linux then! Are there any good resources, youtube videos, bloggers or any content creators, books that go explain everything important about linux to get it running in an optimal and efficient way that are fun and interesting to read? From things like how the file hierarchy works, what is /etc, how to install new programs with proper permissions, when to use sudo, what is a flatpak and why use it over something else, how to backup your system so you can easily reconstruct your setup in case you need to do an OS refresh, etc? All those things that people take for granted but are actually a huge obstacle course + minefield for beginners?
And more importantly, that it's up to date with actually good advice?
dpkg -l
will list all .deb packages installed on your system.That gives me a list of over 2000 rows inside of the terminal that i cant apparently search or sort -.-
Then I tried to be smart and do
man dpkg -l
to see if that has any options on how to use it better, and instead i got another huge text file that i cant search or navigate through properlySo then i googled how to open it in an editor and tried
man dpkg -l | nano
, which does open it for a second and then crashes, i just get "too many errors from stdin, buffer written to nano.12608.save" in the terminalofc something as simple as
map dpkg -l | vscode
doesnt work eitherI'm just tired
It can be exhausting to know just enough to see results that aren't quite what you're after, but not quite know enough to refine it to get what you want. And you're supper close to it. Here's some things to fill the gap (and correct a misunderstanding or two):
The
dpkg -l
command can be postfixed with a search pattern:dpkg -l lib*
will return all packages with names that start withlib
dpkg -l ?lib*
will return all packages with names that havelib
in the second third and fourth character positions.Yeah, man pages are overwhelming at times. There are ways to navigate them in the terminal, but I would have to look that up because I pretty much never do that. It's easier for me to just look it up online or open the text in an editor. Looks like you had the same idea with trying
man dpkg -l | nano
andman dpkg -l | vscode
and you were so close to the end goal of reading the man page in a text editor!Here are two ways you can make it work:
For both methods you will need to drop the
-l
so just useman dpkg
.Method 1:
Use the
>
operator to redirect the output ofman dpkg
to a file:man dpkg > dpkg.man
(note that the file name after the
>
operator above can be anything you want the name of the file to be. I chosedpkg.man
because it seemed like it would be easy to remember for me.)Then open the file using nano or vscode:
nano dpkg.man
code dpkg.man
(note the name of the package for vscode is
code
)Method 2:
Use the
|
operator to send the output ofman dpkg
to a nano filebuffer:man dpkg | nano
Then open file that was saved when nano returned an error message. In your case:
nano nano.12608.save
code nano.12608.save
(This second method feels a bit janky but it works.)
Since you were talking about using
apt-get
andapt
to manage packages, I'll suggest nala as a more beginner friendly alternative that is more verbose and explicit about what it is doing. Give nala a try.I hope this helps and that you can return to learning how to get things done using Linux with renewed resolve now that you've had some time away from it.
Keep asking questions! You're probably learning more than you realize already.
Thank you very much for such a detailed answer! This is exactly the type of stuff I wanted to learn in advance from some generalist tutorial because honestly, I feel bad constantly asking such basic questions and there's no guarantee there will always be someone like you to answer them. In retrospect it's probably the smarter and simpler option to just google the command docs online, I just wanted to do it "right" since I heard all the praise about
man
command and you never know if you're working offline.I'll check out nala, could be a good learning tool, thanks!
I find that books and resources on basics are hard to find motivation to get through. I don't have a problem researching for an hour or two when I'm stuck on something that I want to accomplish, but that same information would be impossible for me to focus on if there's no immediate motive to read it. Knowing that some information might generally come in handy later is often not enough for me to stick with it. So I don't think people really mind helping people with "basic" questions, but their availability can unreliable.
That said, there are a lot of good suggestions in both threads you started and if you can stick with any of them it will probably be a big boost for your comfort level in using Linux.
Now you can open man pages in your favorite text editor with all the associated navigational conveniences!
A lot of people who try nala never switch back to apt, I hope you find it more pleasant to use.