
Unlike some operating systems, Linux doesn’t try to hide the important bits from you—it gives you full control of your computer. But to truly master Linux, you need to understand its internals, like how the system boots, how networking works, and what the kernel actually does. In this completely revised second edition of the perennial best seller How Linux Works, author Brian Ward makes the concepts behind Linux internals accessible to anyone curious about the inner workings of the operating system. Inside, you’ll find the kind of knowledge that normally comes from years of experience doing things the hard way. You’ll learn: –How Linux boots, from boot loaders to init implementations (systemd, Upstart, and System V) –How the kernel manages devices, device drivers, and processes –How networking, interfaces, firewalls, and servers work –How development tools work and relate to shared libraries –How to write effective shell scripts You’ll also explore the kernel and examine key system tasks inside user space, including system calls, input and output, and filesystems. With its combination of background, theory, real-world examples, and patient explanations, How Linux Works will teach you what you need to know to solve pesky problems and take control of your operating system.
Windows is pretty much all GUI (I've left before getting used to Powershell) and that works great until you want to do rules-based changes or do profiles (without using MDM) with changes snapshot.
Most software have good manuals so once you've got a bit used to the linux's way, it's quite easy to adjust anything you need. And after a while, you find you're mostly using a few handful packages and you'd have their configuration saved in your dotfiles. As for packages suggestions, that's what distros are there for.
Linux is all about reading.
1. 25+ years ago I used http://easyfwgen.morizot.net/ to generate an iptables based local firewall. Still works fine (then and now tweaking some things) and allows only certain ports too be accessed at all. I just open email, ssh and a web server.
The generator is well documented and still works, although it would be nice to see an updated version to newer firewall software like pf.
2. server configs:
edit /etc/hosts.deny --> restrict all by default
ALL: ALL
edit /etc/hosts.allow --> allow your service providers networks, e.g. sshd: .t-dialin.net
sshd: .dip0.t-ipconnect.de
So you can connect to your machine for further setup, but not the whole world.3. set up sshd:
edit /etc/ssh/sshd.config
# allow key-based access only
PasswordAuthentication no
Maybe change sshd's port (reduces log file entries) but don't forget
to allow this port in your iptables setup and your /etc/hosts.allowPeople have opinions an key-based access, I know. But my private and public key is stored in various secure locations, including my phone (password safe) and I can access my server even from my Android phone or tables via Termux.
4. set up email (I suggest postfix as an MTA):
configure restrictions in /etc/postfix/main.cf, e.g.
# restrictions in the context of the RCPT TO command
smtpd_recipient_restrictions =
reject_invalid_hostname,
reject_non_fqdn_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
check_sender_access hash:/etc/postfix/sender_access,
reject_unknown_sender_domain,
reject_unknown_recipient_domain,
permit_mynetworks,
reject_unauth_destination,
[...]
# restrictions for clients connecting
smtpd_client_restrictions =
reject_unauth_destination,
check_client_access hash:/etc/postfix/access_client,
reject_unknown_client,
reject_unauth_pipelining
This heavily reduces the amount of spam you'll see. I add greylisting too, as this even nowadays reduces even more unwanted traffic. Combine that with spamassassin if you like. This setup gives me maybe one spam per day reaching my inbox (actually the spam subfolder).5. Learn by doing (not just reading stuff on the Internets ;-), that is, set up a machine, e.g.
If you'd like to experiment a bit, take a look at Hetzner's unexpensive cloud servers, these are easy to set up (incl. a virtual firewall in front of it) and take down after some experiments of a failure. You can do this in Hetzner's web interface, even if you misconfigure your server to be unaccessible. Cf.
https://docs.hetzner.com/cloud/servers/overview/
Tip: Hetzner's web interface allows you to pre-define an ssh key which they'll install automatically on your new machine (but they leave password login enabled, so change that asap).
Disclaimer: I'm just a happy customer, no other relation. And it might be as easy to do this with Digital Ocean, which have some nice tutorials too, for example on the set up of a web server:
https://www.digitalocean.com/community/tutorials/how-to-inst...
Last but not least No Starch Press overs some nice books like "How Linux Works" or "The Linux Command Line" (if you're not sure about that) or even "Linux Firewalls: Attack Detection and Response" ...
You learn most by trying.
I'm now heading for the beach to enjoy some offline adventures and will answer questions later if needed.