Let’s first set the scene: I’m participating in an Infi study group and would have to present to colleagues about “WTF is Linux?”. Interestingly, I am a total Linux beginner, and they were ranging from intermediate to advanced skill levels. Joy!
So, what’s on the to-do list? Three things:
- Understand history and context of Linux;
- Get to know what you don’t know yet;
- Learn what the tools to learn more are;
Basically, I’m looking for all the things I need to get started and to keep going. Note that all this is aimed at folks that are at least to some degree a power user.
History and Context
First there was Unix, which was great, but it was closed source and not very portable. So Richard Stallman set to create a clone: GNU. However, the kernel “GNU Hurd” didn’t work out so well at the time. So Linus Torvalds wrote the Linux kernel in the 1990s, and together they now form the Operating System “GNU/Linux”, often referred to as just “Linux”. History has by now shown that GNU/Linux was far more popular than GNU/Hurd.
Before we dive into Linux itself, let’s consider its place amongst other Unix-like OSes. There are both open source ones such as Minix and FreeBSD, and closed source ones like Solaris. All of them are fully or partially compatible with “POSIX“: a standard for OSes. You can get the full picture at Wikipedia, but here’s a simpler version:
Zoom in on the green “GNU/Linux” box, there turn out to be very many Distros. A distro being the Linux kernel, GNU tools, a package management system, and possibly a window system and desktop manager. Again, there’s a full picture at Wikipedia, but I made a more condensed overview:
The top ten distros for 2016 according to DistroWatch are as follows:
|Cinnamon, MATE, Xfce, KDE
|community-driven spinoff from Ubuntu with a lot of out-of-the-box multimedia stuff
|reliable Linux distro that can be used plain, but is also the ancestor for many other distributions
|Unity (moving to Gnome 3)
|beginner-friendly spinoff from Debian, both for desktop and server environments
|None, Gnome, KDE
|community program sponsored by SUSE, to promote use of Linux everywhere
|XFCE, KDE, Gnome
|power and flexibility of Arch, but with a friendly installer and some more GUI stuff added
|latest and greatest features that will also go into Red Hat Enterprise Linux
|spinoff from Ubuntu for newcomers accustomed to the Windows GUI
|spinoff from Ubuntu with the look and feel from Mac OSX with a few custom apps
|None, Gnome, KDE
|basically Red Hat Enterprise Linux without the enterprise license and support fees
|very minimalistic Linux distro, requiring the user to take control of the OS
There is also a pretty good Youtube video that gives some context about this same list.
Oh, and obviously I also have to do an honorable mention for the weirder, more “clickbaity” Linux distros: Satanic Ubuntu, Christian Ubuntu, Damn Vulnerable Linux, LinuxBBQ, Slackintosh, and Stresslinux. For the most part I have no clue what they do (if anything at all), I’ll leave that as an exercise to the reader.
What to Know
First thing to do when getting started with a new technology is finding out how much you don’t know yet. Thinking about the Dunning-Kruger effect…
… I would like to start at the Valley of Despair right away. And I’d like a clear path of that slope ahead of me. Please.
Now obviously you can’t start from zero; even reaching the Valley requires some knowledge. So investing some generic startup time seems good. Here’s a few suggestions:
But where to go from there? What is there to know? Well, there’s a few obvious resources that serve as very natural check lists:
In addition, it seemed helpful to try to do one or two nontrivial in-depth tasks in a VM, and see what you encounter. For example setting up a LAMP stack to host WordPress in a VM, or cloning a cool project and getting all dependencies (like Java, ugh!) up and running.
At the end of my research, and with help of my study-buddies, I conclude these are the few essential skills that I’m missing to be productive with Linux as a developer or sysadmin:
Command Line. Without solid knowledge here you’ll feel lost for any nontrivial task in Linux. Some “introduction to Linux” articles tell you it’s not really needed (depending on the distro you choose), but I disagree, and think you’d get frustrated unless you learn to use it.
SSH. Related to the Command Line, knowing how secure shell works is essential to managing a remote Linux instance (e.g. a VM in the cloud). This includes knowledge on managing SSH keys.
Nano or Vim or similar. Also related to the Command Line. Often you’ll have to edit a config file from the command line, and being able to do that confidently is quite helpful.
File System Hierarchy and Permissions. Knowing where to find stuff (and who has access to it) is essential to be productive. On a specific note, it seems important to know where things will be logged (e.g. where does a package install or server software keep its logs).
Package Management and Installing Software (and troubleshooting that when it goes awry). Most interesting tasks on Linux require installation of libraries and software, and quite often this can go awry. You need to learn how to debug this.
My advice, at least to myself, is to sit down and carefully master these first. At least to some degree. Only then will other tasks on Linux (e.g. managing an NGINX server) not be a frustrating job anymore.
Learn to Learn
So how do you most efficiently climb this learning curve? Discoverability of essential info on Linux can be a bit of a problem. But here’s a shortlist we came up with:
man can be used with any other command as an argument, and it will explain all about it
info is GNU’s answer to
man, intended to be more fully-featured (hyperlinks and such) and comprehensive
- The “bropages” is like
man but more succinct and example-based
which are commands for finding stuff on the file system
aptitude in Debian distros, or a similar tool for your set of distros, to help understand the package system
unix.stackexchange.com can be a great generic resource for Linux (and other *nix OSes)
https://askubuntu.com/ is quite a vibrant community should you choose to use that distro
LPIC (or similar) exam objectives can be a great study guide
- read shell scripts before executing to learn
- and as a final trick, you could do
git init in a certain folder (e.g.
/var/log) and use
diffs to check how things change following your actions
However, perhaps unsurprisingly, the most common piece of advice when asking experts “How to learn?” is…. practice. Practice, a lot!
PS. This was cross-posted to Infi’s blog.