41
votes
I want to learn more about linux
I know the basics commands, command substitution, redirection, pipelines, and I know about .bashrc, .vimrc etc. but I feel like I still don't know a lot and I feel a bit lost as to where to learn more. I know I'm being a bit vague, but that's on purpose, I don't really know what's possible. feel free to suggest any book or resource that you think would help me learn more about linux (I also haven't been keeping up with it lately, so any new stuff like what's NixOS would help)
I asked a similar question last year and got a ton of useful responses. I hope it helps you as much as it has helped me!
The Linux Upskill Challenge is a great place to start if you're after a primer in a broad range of Linux-based bits and pieces. I don't know much about NixOS, but if you're wanting to learn Linux for professional reasons, I would stick to learning Debian or CentOS for now. NixOS seems pretty cool, and I like idea of the Operating-System-as-Code model, but stability, consistency, reliability, and predictability are champions of server administration, and from what I have seen in my years working with Linux, it isn't the systems that reinvent the wheel which see the most use.
I just wanted to know what all the hype around NixOS was, but linux upskill challenge looks great, Thanks
That's fair! I think it's partly due to it being the new hotness, and a novel way of configuring a system. Particularly for the ricers at /r/unixporn I can see having one single config to rule them all being very attractive. By all means have a play with it! But (from what I gather) it's conceptually very different from most distros, and might not give you a good grounding in how Linux works more generally
Arch and other distros were very close to a "one config file" situation for at least most things via the old rc file method, but that approach was ultimately retired in favor of systemd.
Are you currently running Linux natively or in a VM?
I know it sounds like a cliche, but I got better in Linux once I've setup my own Arch installation by following the guide and then use/fine tune it to my needs, as I was forced to use and learn it.
For example I have not only learned to use the commands and pipes and all of what you have mentioned, but also how a typical system is build up. From display to audio server, to permissions and systemd. Installing obscure drivers to support fan/temp sensors. Eventually switching from Pulseaudio to PipeWire, from Xorg to Wayland.
I also used to do server administration. Setting up Docker/Kubernetes, or doing that directly on the machine before containerization was popular. I think I really learned things once I actively used Linux in private, and not only at work via SSH.
I never touched a book and rather used/set up Linux and studied the Arch wiki. There were a lot of cheat sheets available that I have used for a longer time, but I can't find them anymore. But I guess they were just replaced by others.
I'm a very practical learner, so the best strategy for me was to force Linux on me, and to overcome obstacles.
For me it was Gentoo, for the same reason - "Alright, let's make myself do the hard parts"
in a VM, I'll try installing archlinux, I've just been a bit uncertain about archlinux since it seems too complicated but I guess that's how I'll learn.
I have a slightly different take on this. Getting better at linux isn't just knowing how to use the command line or how to install a more complicated distro like Slackware.
Although people often use the term "linux" to refer to the entire distributed system, linux itself is really just the kernel. Its job is to provide an interface between the running applications and the hardware. If you really want to learn more about linux, you should learn about operating systems in general.
Those are the kinds of things you'll want to look into. If you'd really like to get into it, I would strongly suggest learning how to program. Even though the C programming language has been around since the late 1960s, it is the language of the linux kernel. Learning C will let you easily interact with the kernel and learn how linux works at a very fundamental level.
At least for me, the best way to learn was to have a reason to learn more Linux! I picked up so much more when I started daily driving ubuntu on my work laptop than I ever did when I was fiddling around with a little kali VM. Use it and fix the problems or frustrations that you come across when they happen, that will give you an amazing grounding in *nix systems!
Linux is dense and impenetrable, and it truly is easy to feel the way you are with it right now, like staring into the void but knowing plenty enough to handle most things it could actually throw at you if only you knew what they would be.
One tip that helped me over time was to download/bookmark the following things:
Whenever I encounter a command from some tutorial or other, I'll often use tldr to give a much simplified view of how the command works and general use cases. If that doesn't contain enough then at least I now have a framework to build upon when reading the man page.
Shell explainer is even better at this but also is definitely less convenient.
If you already get command substitution and piping you're also well on your way to writing super complex shell scripts. A good project is to keep an eye out for any frustrating thing you end up doing all the time on your Linux box and automating it using shell scripting. For example I have a few shell scripts that boot up jupyter notebook in a particular directory with a particular python environment, but they do it behind the scenes so it's all just in a tmux window ready for me to connect to if I need to.
Keeping your passion and nerding out about getting this that bit more elegant or useful or fast really helps it getting into the real details of Linux.
Also writing your own bash aliases to save you time is so bloody satisfying!
I hope that's of some use, it sort of became a bit of a ramble because I have not yet had coffee.
A nice preinstalled alternative to tldr is just to curl the cheat.sh website:
It's pretty useful, and works just about anywhere
Ooooh that's super cool, I had no idea that was a thing! Thanks a lot for the new info :)
If you want to get really into the nitty gritty of Linux, I can’t recommend How Linux Works highly enough. It literally starts at zero and walks you through everything step by step.
Personally, the best way I learned was hands on so I suggest getting something like a raspberry pi and toying around with it. Can set up something like pi-hole and a vpn server on it so you can always block ads using pi-hole even when you’re not home.
If you’re into home automation I’d also recommend checking out Home Assistant or Homebridge
There’s tons of cool stuff you can do with raspberry pi’s and it helped me fall into a job where the servers I manage run on RHEL and I love it.
I’d suggest getting setup and comfortable with docker on your local machine. This would then let you run Linux containers of all sorts of flavours, which you can then experiment with. This way you can explore the differences between debian, alpine, and centos based distros, try out different packages, explore group and user management, etc; and the nice thing about docker is of you screw everything up, just kill the container and start fresh!
Then you can explore building Dockerfiles that customise a setup that you find you like.
Lastly, ChatGPT is a fantastic tutor for systems related learning; you can effectively describe your learning goals and ask it to construct a learning pathway and then facilitate moving along that pathway.
Good luck!
The Linux Professional Institute has a manual you can get for free for their LPIC exams. It contains a ton of great information for deep familiarity with Linux. I'm studying for the LPIC1 cert and it shook my confidence since I was only aware of half the content, and my Linux knowledge was one if the few things I've been confident about.
NixOS is an experimental distribution that's trying to do a few things: firstly, to make linux systems reproducible second, in pursuit of the former, to consolidate configuration options to a single language and therefore configuration file/set of files, and finally, to avoid namespace and versioning collisions in package management. In essence, Nix as a package manager generates dynamic PATHs and coordinates dependencies at "compile time", and does so atomically. That means that when you update your system, instead of the normal process of placing all binaries in (/usr)/bin/, config files in /etc/, and so on, it generates UUID-coded directories which are then symlinked into the traditional locations at boot. That means you can return to previous configurations just by rebooting, that power failures effectively can't screw up upgrades on the software side, and allows for per-user package trees. Even run two programs with conflicting dependencies simultaneously.
The Nix language, in order to be able to handle so many tasks (one could imagine it stepping through the entire process of building a distribution every time you install a system package) is turing-complete, and for the sake of suitability for configuration, is a declarative functional language. It is an ugly and awkward one. The system on top of Nix that is NixOS is poorly described and hard to understand. However, it is a very powerful toolset, and it may be "the future" of package management once documentation is improved and/or new systems inspired by it take off. It very nearly offers the level of customization that Gentoo can, while feeling distinctly less like a junk drawer of random IKEA tools, and is rapidly approaching the accessibility of a manual Arch Linux installation. It's tough to use to its potential though.
Linux user (both personal and professional use) since 1996, Unix user before that.
I strongly urge you to learn the vi (or vim) editor. It isn't difficult.
Learn to write your own bash scripts; bash is goofy in places but you can do a tremendous number of useful things with bash.
If you are inclined toward programming, learn C.
This should keep you busy for a while!
well, I do know vim/neovim, I'm comfortable with the key bindings and other features. I know basic bash scripting too, not C though.
This is so right! Funny enough, back in college, at a unix-centric course, the professor would often state: "If you learn C (the programming language), you ARE learning Unix, and vice-versa!" Certainly, learning Bash will NEVER be a bad thing...if one can learn at least some aspects of C, it vastly improves understanding of operating systems based on C - like Unix, etc. Of course, the value differs depending on what job one wishes to have, or whatever learnings one wants to achieve, etc. But, bash and C are so powerful, it never hurts to get exposed! ;-)
Depends how you like to learn. Nearly everything you want to figure out for Linux is available to learn on the Internet. The downside, especially when you are starting out in any particular task is filtering useful content.
I found having a book about Linux commands very helpful speeding up this process. Want to know how the "cat" command works/how to use it. There will be dozen websites/forums/reddit with basic usage. If that's all you need cool done. But if you want to go a bit deeper it may take some time to find a good example. A good book open the index find the "cat" page and it goes through the command from simple to advanced usage, but no cut and paste :-)
I have started with OpenSUSE back in 2008 or 2009. I used it to learn the basics like folder structure, permissions, ownership etc.
Like a year later I jumped right into Gentoo where yu basically have to build amost entire syste yourself. You get some basic running system (with compiler) and from there it's up to you. Just by installing the system (by reading through the Gentoo handbook) I learned a ton about Linux. Gentoo is hard, but if you manage to pull it off, you learn along the way. Just getting somewhat usable OS (GUI, basic pograms with all of the wanted functionality) rewards you with knowledge.
If you run into issues with setting something up (apart from kernel and maybe graphics drivers), look at Arch wiki. It's the best knowledgebase for anything Linux.
First of all, are you using it routinely? Put yourself in situations that demand your learning. For example, maybe you can build your own NAS or set up a web server; something moderately complex that'll exercise different domains of knowledge.