How do I learn to understand Linux?
January 13, 2016 4:41 PM   Subscribe

I got a new laptop. I tried Linux (dual-boot Win10 with Linux Mint). I think I'm in love. But I feel a bit lost and befuddled. How do I learn to understand Linux generally, and Linux Mint specifically?

Despite using Windows operating systems for most of my life, I don't think I really understand them. If I need to fix a problem, I Google a solution. I would like understand Linux in a more ground up sort of way. If Linux were a car, I would be able to name most of the parts, and understand how they interact, even if I couldn't necessarily repair every single thing myself. (I'd like to be able to change my own oil and replace a headlamp, but I don't think I need to know how to rebuild a carburettor yet.)

I'd like to understand more about Linux Mint specifically, too. I chose the distro because it promised a soft landing for Windows users, and it did that. But I'd like to learn more.

To these ends, is there something I should read? Is there a book I should buy? (With a Linux Mint 18 on the horizon, it feels like it might be the wrong time) What resources should I seek out? Any suggestions appreciated.
posted by Gin and Comics to Computers & Internet (27 answers total) 26 users marked this as a favorite
If you understand Linux from the command line, you understand Linux. I haven't actually done this yet, but I bookmarked it for future use.

FWIW, I got from newbie to competent with Linux almost 100% by Googling "How to do X in Ubuntu" every time I needed to do something. Also, if there is LUG (Linux User Group) in your neighborhood join it and be active. You'll learn a lot via osmosis just from hanging out with full time Linux users.
posted by COD at 5:06 PM on January 13, 2016 [3 favorites]

It depends on what you mean by learn Linux from the ground up. I'd start by building the kernel from source, going through the configuration and deciding which parts you really need, and then booting up your custom kernel. (see here, maybe).

Linux is really two things: the kernel, and then the software system running on top of that kernel. If you want to figure out exactly what's running on your system to make it what it is, you should read through the scripts and configuration for the init system. These days I think linux mint uses upstart (not sure, I've never run Mint). See what Upstart starts, read the manual pages for each piece of software spawned by it, and so on. Once you understand why upstart does what it does you'll have a good start on a grasp of how the system is structured.

There's a lot more to it. The best way to understand would be to read the code. But that's hard and time consuming. If you were curious about UNIX in general, and not Linux in particular, there is the amazing Design and Implementation of the FreeBSD Operating System. There might be an analogous book for linux, I'm not sure.
posted by dis_integration at 5:07 PM on January 13, 2016

Every time I have to fix something in Linux I do hella Googling, I admit, but one thing that really helps understand what the instructions I find are telling me to do is learning the command line. That's that thing where you have a prompt and you type in a command and get back output and whatnot. Luckily, learning the bash shell is pretty timeless, you don't have to worry about a new Mint version coming out.

You will probably also want to learn a command line based editor like vim or emacs, I prefer vim myself (insert nerdy holy wars here):

You'll want to be good enough in the command line editor to open up a text file (lots of Linux config is just text files), find the content you want, make some changes, and save them. Everything else is gravy.

If you ever want to fool around with the Linux command on a machine that you can just destroy if you want, you can actually rent Linux VM servers on the internet pretty cheaply (by the hour even):

Then if something goes wrong, you can just trash the instance and make a new one.

Once you're good with the command line, if you have access to a cheap computer, you can try installing a hardcore distro like Gentoo, which compiles everything from scratch. I did this back in college and it was the first time I ever understood Linux enough to stick with it.

Anyway, the command line is wonderful and some fun commands to learn might be:

* awk -- manipulate text files, especially tab delineated spreadsheet like text files
* find -- find files on your file system (all the JPG files)
* grep -- search through files
* xargs -- use with find + grep to find things in certain files!
* wget or curl -- download a file on the web (HTML, image etc)
* df and dh -- disk space knowledge
posted by foxfirefey at 5:15 PM on January 13, 2016 [3 favorites]

I learned one hell of a lot about Linux by building Linux From Scratch years ago. Even though I've forgotten a lot of the specifics, it was really helpful in understanding how everything in a Linux environment works together from a very low level on up. It's worth noting that LFS doesn't get into package management, which is how any decent, contemporary distribution deals with software installation and upgrades - but LFS is more about learning nuts and bolts. You probably wouldn't wind up actually using an LFS system long term, but it's an interesting process (dare I say fun, if you're the tinkery type) that you could liken to building a complicated model. (Caveat: Building LFS on a laptop might be trickier than on a desktop, although Linux driver support in general is light years ahead of where it would have been when I was doing it circa 2000. I built mine on an old Pentium III tower.)
posted by usonian at 6:15 PM on January 13, 2016 [2 favorites]

I love Linux Mint. I recommend the O'Reilly books as a starting off point. There is a plethora of resources for using/understanding, you just have to look for it. This is what my Systems Administrator boss first gave me when I started as a Jr. Sys Admin. I had only used Windows up until that point and learned to use (and love) Linux based distros.
posted by lunastellasol at 6:38 PM on January 13, 2016

I think in addition to learning command line tools you should also explore the different desktop environments. They will show you the variety of programs that can be used to do the same task and also that linux isn't one thing. Your laptop running Mate, Cinnamon or KDE is Linux but so is someone's Raspberry Pi that is only accessed over SSH in a terminal window.
posted by any portmanteau in a storm at 6:46 PM on January 13, 2016

You remind me of me several years ago, mainframe and Windows experience but zero Linux knowledge.

For educational purposes I decided to build an Ubuntu file server, and ever since then one thing leads to another. E.g., so I set up Samba on Linux so that the Windows machine(s) could see the file shares exposed on the Linux box. Then I set up the "crontab" so that nightly backups occur on a scheduled basis. And so on. Then I bought a Raspberry Pi and had to figure out how the Pi could see the shares on the Linux file server so I investigated CIFS and fstab. Along the way I did a lot of Googling, I read this to help understand the Linux file system, and lately I signed-up for the Stack Exchange Linux & Unix Weekly Newsletter.

Obviously the above is not a formal process, I was just trying to say that if you poke around and experiment you will discover how rich the Linux environment and architecture is. Caution is warranted though when working in the command line. If you want to ask me any general questions feel free to MeFi Mail me (though I'm not an expert in anything Linux, so Google will get you more specific answers faster). Enjoy the adventure.
posted by forthright at 7:26 PM on January 13, 2016

Linux Mint is so beautiful, and absolutely is just about a straight shot from WIN7.

Ever since Windows 95, really, I've rarely needed to go deep. I knew DOS pretty well, and so much of the software was command line (I was just thinking yesterday about Wordperfect 5.0, so powerful but you really had to dig to get the goods out of it) that it was just part of having a puter.

It's not that I can't learn the internals -- I was a mainframe programmer, assembly and CoBOL and MVS and DB2 and JCL and blah blah blah blah; I can learn -- but there's always some good utilities "out there" that'll do most anything I need done, and they're mostly free, and if they're not free there's one just like them that is.

Point is, I let the software be "soft" -- I bang up against it hard enough and long enough to learn to do whatever it is I need or want to do. Point and click -- hmmm, I wonder what's in this dropdown? *click* Ah, that's how to change this toolbar, or that one, or what-have-you.

What I love so much about Mint is that I don't need to go deep to get where I want to go. It's beautiful *and* soft.
posted by dancestoblue at 7:50 PM on January 13, 2016 [1 favorite]

I'm a longtime (but now former) Linux user.

What you're hoping will happen is not realistic. The basic fact of the matter is that modern computer operating systems and the software running on them are complicated enough that no one can really develop an understanding of them sufficient to actually solve most problems; instead, the best you'll potentially do is get good at efficiently Googling for the information you need to fix this or that problem. That does not really entail any sort of real understanding of the system, certainly nothing like understanding how a mechanical system works and how to fix it. Instead, it's a lot of highly specific knowledge that constantly goes out of date and has to be replaced with new knowledge.

It's worth taking the time to get good at using the command prompt -- that's a skillset that goes a long way to enabling you to do complex and cool things with your computer with surprisingly little work. But then, that led me to eventually switching to a Mac, where I can get the same powerful command line software (BASH) without all the various other headaches of dealing with Linux.

Being proficient at administrating a Linux box doesn't really involve all that much understanding of the operating system or computers; systems administration is a specific skillset among many others dealing with computers, it's one that is limited in its scope (as is any other computer skillset), and it is a mistake to attempt to acquire it in hopes that it will translate into or turn into some broader "aptitude" for or understanding of computers (and it definitely won't teach you any of the esoteric ins-and-outs of how operating systems really work at a deep level). It's not a skill that with all that much utility in real life.
posted by mister pointy at 7:56 PM on January 13, 2016 [5 favorites]

Arch Linux is this weird hybrid of very easy-to-use Linux distros (Ubuntu, Mint, Fedora) and expert distros (Gentoo, Slackware, BSDs). You're forced to install it at a low level, with terminal commands and many different steps. But it also has really extensive documentation, often targeted at beginners, so you can actually complete it!

It's definitely a big change, and I'm not sure I'm actually recommending it. But if you really want to understand how things work all the way down, that's one way to go.
posted by vasi at 8:03 PM on January 13, 2016 [2 favorites]

You could start with the Linux From Scratch book, this is a pretty awesome hands on creation of a full install piece by piece.
posted by nickggully at 8:46 PM on January 13, 2016

Hi. I think I might be what you want to be. I've been running Linux Mint on my laptop and home desktop computer for several years now, and have no regrets about switching from the Mac. I'm not a power user, but I have a general idea of what and where things are and how they interact on my system. When something goes wrong, I usually am going to need to search the web to figure out how to solve it, but I often at least have a good sense of where to start. I like learning more about my system, but my main priority is just getting things done using my computer; I'd rather not spend hours customizing or fixing it.

Things I've done to get more skilled at using (but not power-using) Linux:

1. Learn to love the command line. Having the graphical windowing system is great 80-90% of the time, but the command line still offers power and elegance and can make your life easier in so many ways. About half the time when I just need to move files around or rename them, I find myself opening a terminal window and using mv instead of the graphical file manager. You could get a book on bash or follow an online tutorial to pick it up. Also, it's fairly crude, but man is really helpful. I'm always forgetting the exact syntax for less-frequently used commands or arguments, but a quick check of the man pages gets me back on track.

2. Get used to using a text editor to look at / modify configuration files. Honestly I don't have to do this very often on Mint, but it does come up occasionally. Knowing how to use vi (or vim) well enough to quickly and easily look at a text file is practically necessary, but honestly about 99% of the time I just use gedit. But if things really go south and your window manager breaks, you'll want to know how to at least muddle your way through fixing config files with vi. I'm sure people that have strong opinions on the relative merits of vi versus emacs will scoff at my suggestion to use gedit for day-to-day stuff, and frankly they're probably right that their editors are superior. But my main concern is getting my system administration stuff done quickly so I can get back to work or play, and it hasn't yet been worth it to me to invest in the learning curve for vim, let alone emacs.

3. Learn a little about apt and the package management system. This was probably the least obvious to me when I started, but the package manager is really critical to your system, and unfortunately has been in my experience the one thing most likely to break (but fortunately in relatively easy-to-fix ways). I'm still learning about how Debian package management works, but having a little bit of understanding has definitely been helpful when things go wrong.

Mostly, have fun! I think foxfirefey's suggestions above are really good for getting started at the command line. I also appreciate seeing the suggestion of Linux From Scratch above; I hadn't heard about it, and it sounds like something worth trying sometime, maybe in a virtual machine.
posted by biogeo at 9:23 PM on January 13, 2016

You probably already knew this, but Mint Linux is a modification of Ubuntu Linux, which is itself a version of Debian Linux. So pretty much anything that applies to Debian or Ubuntu will also apply to Mint.

Personally, I learn by doing. I've been on a bit of a journey myself the last several years, using an old desktop computer I turned into a headless Ubuntu server. I've learned the most by having a specific goal in mind. Here are a few suggestions:

- Learn Bash. Learn to write terrible Bash scripts to automate things. Get familiar with the usual command-line utilities (vim, sed, grep, xargs, find, tar, mount, chmod, chown, sudo, etc).

- Build another Linux box, or rent a VPS ($5/month for a minimal one that will work fine). Learn to log into it from your laptop using ssh. Try X11 forwarding. Transfer files to it. Install a web server on it (lots of "fun" here, if you're interested in that sort of thing).

- Figure out how to use tmux or screen to persist a terminal session (less useful for your laptop, more useful for a Linux server).

- Play Nethack.

- Write a Twitter bot or something in Python. Set it up as a system service.
posted by neckro23 at 9:55 PM on January 13, 2016 [1 favorite]

@mister pointy

Help me understand better: why does switching to a Mac beat learning Linux?

What are "all the various other headaches of dealing with Linux"?
posted by armoir from antproof case at 10:08 PM on January 13, 2016 [1 favorite]

Another book recommendation: The Linux Command Line. Covers a lot of stuff but is easy to read, and the ebook download is free!
posted by number9dream at 10:33 PM on January 13, 2016

In addition to all the other good things suggested here, hang out at the Mint forum. There's a lot to learn there. And the largest part of that will still apply in Mint18.
posted by Too-Ticky at 2:55 AM on January 14, 2016

Linux is essentially a Unix, so a bit of historical perspective on the creation and history of Unix might be interesting: and (Sorry, links aren't working.)The core members of the original group of Unix developers have each published about their experiences.

My advice is to let your curiosity resolve itself at its own pace, When you have a question, go find the answer from something that grounds you in a fundamental understanding of how things work. This will seldom come from random Googling and scouring forum posts from random people. A considerable number of useful books exist about this subject.

The "Command Line": I've used Linux, and Unix before it, for more than 20 years. I don't use the command line any more than necessary. We should be able to what we need to do via the GUI interface, as we do in Windows and OS X, Android and iOS. If we really need to resort to the command line, then that usually indicates a failure of the GUI.

The "command line", as much as a GUI, is an interface that accepts instructions and input from a user and then dispatches that input to the operating system for execution. The results come back from the operating system and are displayed to the user.

Those interfaces are different and have different capabilities and limitations, but they all do the same thing.

The "command line" exists because hardware capable of displaying GUI's didn't really exist 40 years ago.

It's important to understand that the "command line" involves communicating with the program that accepts what you're typing. There's a method and a consistency and a lot of rules to it, it's not about chanting magical incantations only a computer can understand.

The web is full of hints and how-to's that are entirely command-line based, typically urging users to copy-and-paste and execute something. That happens for three reasons: 1. A lot of simple plagiarism happens on the web. 2. It's much easier copy in few lines of text into youro site than it is to explain how to use a GUI to do the same thing. 3. GUI interfaces vary, while the command line interface is, essentially, the same everywhere.

Copying and pasting command line snippets will not help you learn anything. And can be dangerous if they are out of date and/or just wrong.
posted by justcorbly at 3:56 AM on January 14, 2016 [1 favorite]

Get a Raspberry Pi, 2 micro sd cards, a power supply and a case for about £60.
Install Raspbian as the operating system.
Now you can mess around Linux without fear that you will break something important.
And when you really mess up something, and can't work out how to fix it, you can reflash the card in 10 minutes.

Then your Mint machine stays as a working machine, and the Pi as an experimental toy.
posted by Dr Ew at 5:43 AM on January 14, 2016 [2 favorites]

Most important thing: separation of user and admin. If anyone advises you to enter sudo command or do something as root, caution: it can fuck up your system if you don't know what you're doing. If something ever asks for a password, beware!

As a user, you might be able to delete your own stuff and mess up your own settings. But you can't mess with the system or other people's stuff.
posted by scruss at 6:54 AM on January 14, 2016

I'm a Linux developer but I mainly just know my one small corner. Any modern OS is too complicated for one person to understand in detail.

I do agree with others that basic command line skills are a common requirement for a lot of things, so it's worth spending some time playing with that.

Beyond that, it'd be worth coming up with some more specific goals, as a way to provide some focus.

If your long term goal is some kid of related career then one approach might be to identify some people doing a variety of jobs in the general area you're interested in and talk to them. A local user's group might be one way to find those people--so, google "linux" or "lug" with "your-city", look for related meetup groups, etc.
posted by bfields at 8:52 AM on January 14, 2016

I'm a couple months ahead of you in the exact same situation -- Linux Mint included. After exploring some 'intro' resources that were all too basic or way too advanced, I found the free edX Linux course to be just the right level of detail for me. The site suggests 40-60 hours of time investment, but I skimmed some of the exercises and later chapters and covered it in less than half that time while still getting a thorough introduction of how the operating system works and how to do function things with it, as well as picking up a lot of the vocabulary.
posted by Durin's Bane at 10:44 AM on January 14, 2016 [3 favorites]

@armoir from antproof case

Well, this is just for my purposes, but for me, the biggest upsides to Linux are available to me on OS X -- it's also a Unix, which is useful since I'm a web developer by trade (it's easier to get our software stacks running and similar to the real world server environment on a Unix; it's a huge hassle to do that work on Windows), and OS X also has BASH, which I like a lot.

Using Linux, on the other hand, is a source of endless hassles and when I used it I constantly had to figure out ways to work around its difficulties, most of which ultimately stem from the fact that it's very difficult to install software on Linux (which in turn is because Linuxes are highly heterogeneous compared to Windows or OS X, meaning that software can't count on the system to provide the right versions of libraries, to have system files present in the same place, etc. etc. etc.) The result is that you generally have to use package management systems to install software, which are reasonably effective for server administration purposes but just really, really suck for the sort of things you want on a personal computer.

The first big issue is just software availability, which is not the fault of Linux, but just a natural fact of life when you're using a niche product. The big problems are with device drivers and the like, and fortunately that has gotten better over the years, but you still have a significant risk of not being able to find software to support some devices -- peripherals, phones, wearables. If there's a Linux workaround available, it almost certainly won't be quite as good, or quite as easy to use, as the proper software. I never could get all the buttons on my Logitech mouse working, for example (there was one that no one seemed to have a solution to get working on Linux), and then one OS update somewhere along the line broke my customization for two of the other buttons. It was still usable, but it definitely wasn't what I wanted.

Beyond that, though, you're often tied to whatever software is made available by your distro; this means that obscure pieces of software might not be available in packages at all, and then you're back to the old fashioned compile-and-install-from-source, which you may not be able to get working, and even if you can, it's a lot of extra work for no benefit. What is available for your distro will be limited -- one instance I remember was when my preferred music player released a version 2.0 that was totally rewritten, and a lot of its previous functionality was gone. I would have liked to just stick with version 1.4, but that wasn't available after I upgraded my distro. Sticking with the old version of a piece of software wasn't a supported option -- when your distro updates, you either update along with it, meaning you HAVE to upgrade every software package you use, or you sit it out (and quickly stop receiving security updates and the like, and that you CAN'T get the individual software updates you want). This means that on typical Linux distros, you're updating EVERYTHING -- your OS and every software package you have installed -- every six months, or else you're on a much slower update cycle (and can't get, e.g., a desirable update to your web browser when it comes out). You can't just update one piece of software at a time here and there when you want, aside from very small bugfix/security updates.

The trouble is that the every-six-months OS updates generally broke something or other, usually because I had had to customize some configuration file at some point and then the changes had to somehow get merged in with the newer version of the configuration file that came with the update to that piece of software. (PHP was my biggest nightmare there, and in defense of the folks at Ubuntu, the blame for that ultimately stems from the fact that PHP is a steaming pit of sewage, but that didn't change the fact that I needed it for my job. On Windows, you'd have the option of installing a Service Pack without updating a piece of software like PHP, or updating the software without updating the OS, but on Linux, that's not a well-supported option.)

It wasn't just third party software that broke on OS updates, either. More than one of those twice-a-year OS upgrades broke Ubuntu's bootloader itself, again because of configuration file stuff, which made my system non-bootable.

To be sure, all of this stuff can be survived, or worked around, and I did for years. I would make do with using out-of-date software because I didn't want to invest the time it would take to do an OS update, or I would do the update and then eventually figure out how to fix all the things that broke. None of the time that I invested in that went to learning anything useful, though. Very much the contrary: I was learning specific ins and outs about the configuration files for pieces of software that would be dated and useless a year later, and that was consuming time that I could have spent actually improving on my software development skillset -- you know, the thing I get paid to do. It wasn't time well-spent. I don't have anything to show for the time I wasted getting Ubuntu to talk to my iPod or fucking around trying to recompile Firefox with support for LCD font-smoothing (I tried using Firefox's installer rather than Ubuntu's Firefox package because I wanted an upgrade early, but the font rendering was busted and the text was painful to read).

Anyone who wants to wrestle with crap like that is welcome to do it, but I have to do enough of that even without using Linux -- it's my least favorite part of software development, so it doesn't make sense for me to invite more of it into my life. And I don't think any of the skills involved in working around these problems can honestly be compared to learning how to change a car's oil, because the Linux headaches are almost always way too specific to have any broader applicability, or to be useful for more than a few months.

(And this isn't even touching on the stuff that got broken for ideological reasons, like when JSON decoding in PHP on Debian Linuxes, including Ubuntu, suddenly broke in an update because some asshole decided that a license term saying "Don't Be Evil" made a piece of software "unfree". Life is too short for that.)
posted by mister pointy at 4:54 PM on January 14, 2016 [1 favorite]

Most important thing: separation of user and admin. If anyone advises you to enter sudo command or do something as root, caution: it can fuck up your system if you don't know what you're doing. If something ever asks for a password, beware!

This is one of those things that you will hear that is not really true. It's true when you are running a public-facing server that a lot of people depend on -- in that case, it's a huge problem because a lot of people will be inconvenienced if the server is taken down.

For a home user, though, this is not really true because your system -- the OS install itself -- is much less important and precious to you than your personal data. "Sudo" and running as root give access to the OS, but so what? You can rebuild that in an afternoon. You don't need sudo or root privileges to access your own data -- i.e. the actual documents, photos, etc. that are valuable to you and potentially unrecoverable if you don't have a good backup strategy in place.

One of the ironies of the security model that is based around multi-user systems is that the stuff that is given the most protection is the stuff that you can fix just by reinstalling your OS.
posted by mister pointy at 5:08 PM on January 14, 2016 [3 favorites]

I'm a happy Linux user (mostly Ubuntu, Raspbian on a pi, and sometimes Arch) and don't find it very headache-inducing for my purposes. I'm not totally sure if that's because I've become proficient in solving issues efficiently or if it's just more hassle-free in general than it used to be. Probably a mix of both.

RE the text editor issue, I wanted to mention that nano is a simple text editor you can run in a terminal that doesn't have the learning curve of emacs or vi/vim. It's a perfectly good option in a pinch if gedit isn't available.

Having a basic understanding of moving/copying files, navigating around directories, and manipulating file permissions you've got the most essential tools for troubleshooting most problems (a little help from Google never hurts). Since your're using Mint, knowing a little bit about APT for installing/removing/updating packages from the command line doesn't hurt either.

Maybe read up on the Linux filesystem heirarchy too (or you could watch a random tutorial). A couple of key things:

Your personal stuff will live in /home/whateveryourusernameis
A lot of system configuration files that can be modified with a text editor are stored in /etc (saving a copy of config files before modifying them is always a good idea, so you can revert easily if something stops working after a change)
posted by Pryde at 9:00 PM on January 14, 2016 [1 favorite]

When using Ubuntu, for most people it's better to stick with the LTS (long term support) releases to avoid the problems with the six-month release cycle mentioned above. The in-between releases will always come with more potential bugs. Mint derives their releases from the LTS versions for this reason.

It's best to handle software updates through the package manager. In many cases, it actually is possible--but not at all necessary--to jump ahead of specific official distro software releases by seeing if there's a PPA for it. This is a way to add a new source your package manager can draw from. You'd find and add the PPA to your sources, APT would see that a newer version of Firefox/Chrome/Whatever is available there and grab it instead of the distro's version.
posted by Pryde at 9:47 PM on January 14, 2016

One last addition to keeping my personal data backed up in a few places, I also subscribe to Crashplan, which does support Ubuntu (and therefore Mint).

Backing up your stuff in a few different ways/places is always the best way to keep it safe, regardless of what OS you are using. Like mister pointy said, anything else can be fixed pretty easily, one way or another.
posted by Pryde at 9:55 PM on January 14, 2016

"I do agree with others that basic command line skills are a common requirement for a lot of things, so it's worth spending some time playing with that."

Oh, and also, these days you should also learn to use "git", best experienced (IMHO) from the commandline, especially if you plan to do any development some day.
posted by bfields at 5:04 AM on January 15, 2016

« Older Looking for quotations and poems about doctors   |   I lost my emojis! Newer »
This thread is closed to new comments.