r/linuxquestions • • 5d ago

Advice Resources To Actually Understand Linux

I've been using Linux for 7 years for personal desktop use, development, gaming, and music production. I consider myself to be a competent user, in that I am able to use the OS effectively to do the things I want to do, but I recently realized that I don't understand the system very well as a whole.

Most of my technical knowledge comes from what I've pieced together by solving various errors over the years. I only know what /etc/fstab is because I once had a drive crash, for example. I am at the point now where I want to learn about Linux by learning about Linux, rather than by reacting to problems.

This is especially because I have more and more friends jumping ship from Windows now. People are looking to me to teach them and help them solve their problems.

What resources can you recommend to gain a more complete understanding of Linux and to use the system effectively?

I'll add to this that my practical experience has been entirely with Debian-based systems (MX, [L]Ubuntu, Mint).

58 Upvotes

31 comments sorted by

16

u/mrflash818 5d ago

Perhaps this might help:

The Debian Administrator's Handbook

https://debian-handbook.info/

3

u/theOtherJT 5d ago

This is a great book!

7

u/theOtherJT 5d ago

The thing that made me understand it better than ever was trying to port the mainline kernel to an old smartphone.

Did I entirely succeed? No. But did I have a good time? Also no, actually.

But damn I now know so much about how the pieces fit together than I ever did before. And hey, at least I got the thing to boot and I've got an X11 desktop - so I didn't get nowhere but then I discovered that power management is a colossal thing that I know nothing about and writing drivers is really hard but shit, spending a few months recompiling, digging through dmesg, recompiling again...

I'm not sure you - or for that matter anyone else - should actually do this. I don't know that understanding at this level is even all that useful, but hey, I've written my own init system now, so that was... I was about to say "fun" but it wasn't fun at all, it was extremely painful, but now I really get why so many of the grey beard types* really hate systemd because fuck me there's a lot going on down there.

*he says as someone who's beard is going decidedly grey

12

u/Simple_Hamster_4096 5d ago

The only way to truly learn is by doing. Set up a headless server and do everything from the command line. Doesn't much matter what you task the server to do, but having to implement and configure everything from command line will give you a different outlook and a learning experience you cannot get from a gui, or reading alone...

3

u/templar4522 4d ago

Learning by doing only makes you good at doing the things you've tried. It doesn't give you the big picture the OP is asking for.

1

u/muffinman8679 5d ago

"The only way to truly learn is by doing."

Amen......

6

u/lyidaValkris 5d ago

LearnLinuxTv. Jay's videos are comprehensive, and in addition he's authored a number of handbooks.

3

u/Dazzling_Music_2411 5d ago

Check out the O'Reilly books by Robert Love.

Linux System Programming for intro

Kernel Development & Embedded Linux Systems for a deeper dive.

2

u/cjcox4 5d ago

Most of the excitement will be in userspace. And in that, there can be a high degree of variance from distro to distro. And of course, that means documentation for each and every "thing" there. That is, in a Linux distro there are many pieces, some are very common across many distros, but you could spend your time learning something very detailed that is primarily used by just one (and maybe that's not what you want?). You mentioned Debian and Ubuntu, which, even then, vary. Debian based distros tend to give more "choices" for fundamental things (or what most would consider fundamental). Ubuntu, though, might "make the choice" with regards to that item.

I'm not a huge Debian fanbois, so take my list with a grain of salt if I differ with typical Debian choices. This isn't a pointer to "sources of learning", but rather things you would want to learn more about.

Shell and shell tools: bash, grep, date, awk, sed, tr, less, vi/vim, fc, cut, sort, du, df, md5sum, last, useradd, groupadd, chmod, chown, tar, zip, and many more. With regards to all of that, there actually can even be old school books.

/etc/passwd,group,shadow and alternative auth sources

systemd unit files/services (systemctl, writing unit files, etc.)

journald (and how to get message to text files so the universe doesn't explode)

postfix, exim

rsyslog

logrotate

cron/at

rsync

sysfs, procfs

lvm

mdraid

NetworkManager

ssh

apache (httpd)

nginx

grub2

qemu

kvm/libvirt/virtmanger

cockpit

package management (install/uninstall): apt/dpkg (Debian), rpm (RedHat/Opensuse), snaps (Ubuntu), flatpak

openssl

gpg

languages(apart from bash): python, php, perl

languages(going deeper): C, C++, Rust, Go, Javascript/Typescript, Ruby(?), (there can be ton of others here) Also, there are ton of tooling elements to learn here as well (think old school make and the plethora of others)

I am sure there are plenty of things not on this list, this was just off the top of my head and probably beats the typical "learn everything" message.

Outside of userspace (duh):

kernel, kernel modules, and, signing of such (tpm MOK stuff)

sysctl

In short, just learning my attempt "at a list" is a lot. And it's far far far from complete. Others may recommend other higher priority things to know, and they are probably right.

It's a pretty big world.

2

u/doc_willis 5d ago

http://linuxjourney.com  (old)  and the newer http://Linuxjourney.org  sites are good to start with. 

The Explaining Computers  YouTube Channel videos is a  good starting point for learning. 

deeper learning, the numerous Linux books from the humble bundle sales are worth checking out.

2

u/jay_613 5d ago

Start using SlackWare... while it's not even remotely as difficult to get working as it was in the 90's, they still refuse to automate a lot of the configuration, so you actually have to learn 10x more than you do with other distributions today. Compiling your own kernal 100x before you'd actually get it to boot, or even trying to g et X11 to start was an achievement in itself.

1

u/iu1j4 4d ago

Slackware is good choice for learning. It is not as configured as other distros. You get default configurations that are not modified and in most cases you need to learn how to setup the service to run it. My path to learn linux was:

  • installing Slackware
  • using it
  • looking for help to setup it in /usr/share , command --help switch, man and info cmd
  • making tgz packages from source as needed.
  • writing shell scripts to automate every manual step that was needed to improve my workflow

3

u/LrdOfTheBlings 5d ago

If you have the free time, build Linux From Scratch. Don't skip reading the package explanations as you go. Don't be intimidated. If you can read and use Ctrl + C and Ctrl + V that will get you through 90% of it. DM me if you get stuck.

3

u/Gnaxe 5d ago

That was meant as literally the title of a book, btw: https://www.linuxfromscratch.org/

1

u/YareYareDazexd 5d ago

Linux From Scratch is waiting for you...

Just kidding, maybe you could make a VM or another psrtition and install DIY distros (command-line only) so when you are installing it yourself, you may start to understand what is going on, like "whst is a bootloader and how it works and why is it important that your boot partition is FAT32?" "How different is it to set up your ext4 partition of btrfs partition", ""what is the difference of dumping all on / partition rather than dividing it in a root partition and a /home partition" "What are the fundamental differences on using the gblic c library and the musl c library?", "What changes when you set up your system with systemd as an init vs using a distro with no systemd, in terms of managing services, config files and everything else?"

For understading how your linux system works is fine. Usually the most commong DIY distro you'll hear about is Arch because it has tons of documentation and its manual installation process can be seen as insufferable if you're a beginner. Once you're done with it, you should understand how your system works since you built it in the way you wanted it. Then you can try other niche distros such as Void Linux (like Arch without systemd and its manual is made for people who already know what they are doing), Gentoo, Chimera Linux (shouldn't be that hard), and you could even try any BSD OS such as FreeBSD, OpenBSD, NetBSD but i suggest you use a VM for this so you do not suffer with hardware compatibility.

Compiling your custom linux kernel also helps since it is very modular, like disabling components you won't need (aka debloating), enable features that would suit your needs, os just experiment with it.

Hope this helps. At lesst breaking things is what helped me to understand linux much better

1

u/ElectricalWay9651 5d ago

I'm in a similar position and I decided to spin up a VM and start from (nearly) scratch.

I love fedora and its derivatives, so I decided to do a fedora install with NOTHING, from the fedora everything installer, then from there, get my DE, WM, greeter, and everything else all setup myself, from scratch

It was very eye opening about how everything works behind the scenes and I've loved it as a side project

1

u/TroutFarms 5d ago

Get study materials for one of the entry-level certifications: LPIC-1, Linux+ or RHCSA. I prefer to learn from books, but there are other options available out there: google "Linux+ training", "LPIC-1 training" or "RHCSA training".

1

u/Flat-Association-552 5d ago

Not sure if this is the direction you’re aiming for but the way Ive learned Linux over the past 2 years was by studying for RHCSA exam. If you’re interested I can share some resources
Here are the exam objectives just to get an idea of the material that’s on the exam

https://www.redhat.com/en/services/training/ex200-red-hat-certified-system-administrator-rhcsa-exam

1

u/Open-Adhesiveness-86 5d ago

How Linux Works by Brian Ward is pretty much written for your exact gap, it goes boot loader to initramfs to pid 1 to udev to the network stack in order instead of as error-recovery trivia. Then trace it on your own box: systemd-analyze critical-chain, systemctl list-dependencies graphical.target, lsblk, ip route. Robert Love's stuff is great but it's syscall-level, different thing.

1

u/neckyo 5d ago

The arch wiki. https://wiki.archlinux.org/title/Main_page

You can follow every step from the installation upwards I heard that the gentoo wiki is good as well.

1

u/LeePetra 4d ago

I will never know Linux well enough to handle everything on my own - and I’m talking about the level of a typical user, not a developer or a system administrator. :)

However, my own understanding of how Linux works came from trying out different distributions (after a few weeks of "distro-hopping") combined with intensive support from GPT.

The distributions acted as a necessary filter (in my case, EndeavourOS), while GPT served as a highly efficient guide.

I realize this isn’t the path to a truly deep, expert-level understanding of Linux. But I’m also a few decades wiser now, and I can listen to those who know more without feeling any sense of inferiority.

1

u/syn_vamp 4d ago

https://a.co/d/01MDpcrs

this will get you 90% of the way there.

1

u/Ok-Network-4239 4d ago

Google is enough, now Gemini.

1

u/wsbt4rd 5d ago

Well, as a first step, you should look into the history of Unix. Then you'll learn that you don't really care about "Linux", but, what you really want to understand how GNU works.

And once you have achieved the wisdom of "everything is a file", the whole mess and stench of the 3rd party userspace will crash your brain .

... And don't even ask about the craziness of Graphical User Interfaces.

If you need more than a vt-100 you need to reconsider some life choices you made.

1

u/mredding 5d ago

There's SO much you can learn, it's hard to pin a good spot to start.

The Linux kernel source is hosted in a Git repository at git.kernel.org. In there, there are documents covering details of the various subsystems. You would be curious to understand the boot process and the ways YOU can interact with it. Your boot loader, probably GRUB, can pass command line arguments to the kernel. What are those arguments? What do they do? How is hardware discovered? How are modules loaded? What other processes don't you know that you might?

AI is useful for helping to ingest all the information. It can also generate documentation for you based on the source code, if you ask it.

You have to be curious and ask yet more questions, and look for opportunities to ask them. Discovery is a journey and you're blazing a trail to every landmark you know and can discover.

It also helps to learn by doing. I've got this workstation, I've installed the Proxmox hypervisor, and I heard of and wanted to run hardware passthrough to a desktop VM. Some of this I read and learned, enough to be dangerous, and installing Proxmox and creating a VM is click-through stupid easy. AI helped me with the details, and it really helped demystify details of the whole system, because now I'm in it, and I'm asking the AI for help and insight about what systemctl and journalctl are, what they interact with, how they work... It's not just about what are the next commands to get the work done, it was about how these things work and why, along the way.

AI doesn't have to make you stupid.

But that hands on experience... That did a lot. I asked the AI to help me diagnose errors, misconfigurations, and inefficiencies, tune the system for my workflows, my hardware, to setup some infrastructure, and boy has it been a journey! I've had more fun in the last month in computing than I have since high school.

So all that is to say yeah, you can LEARN about GRUB kernel parameters, but what's the point and retention rate of just READING about it if you don't USE it? So an exercise in tuning your system is a good one to get your feet wet, because you're probably going to use a few, and the AI has you reboot and run commands to prove that the kernel parameters are actually working.

I would suspect only a selection of experts have a very full and comprehensive purview of the whole system, because it's a lot. systemd is an ecosystem unto itself on your machine, and you can get just as lost in that. GNOME, same thing - I accidentally discovered gnome-exensions this morning and now I'm REAL curious...

0

u/Zen-Ism99 5d ago

Willing to bet there are numerous books…

0

u/FinstroDeLaPradera 5d ago

Go to openSUSE

-4

u/Slick752 5d ago

Are you kidding me? In the era of AI?