How to Git Gud with Linux (From Zero)

Sep. 20, 2024 [technology] [guides] [introspective]

Most of the content on Wrongthink assumes that readers are already competent with Linux and computers. There hasn’t been much here that speaks to the beginner, and we should respect that we all started out somewhere. If you’re just coming into the Linux and libre software side of things cold, with little familiarity to speak of, the starting hurdles can seem like unscalable walls. Some forum interactions had recently reminded me of this, so it’s time for me to try to put myself in the shoes of an aspiring unix autist starting from scratch.

I’m a lifelong Windows user and I really want to switch to Linux. How do?

One of the biggest hang ups is in trying to preserve every little program and aspect of your workflow that you’d grown accustomed to. Before I migrated over, I had compiled a list of all the software that was important to me at the time, much of it games, with the intention to get them installed once they had been ported (if ever). Or by finding the closest fascimile that could be installed at the time. What I’d discovered is that it is often easier to let go of the things you thought you’d need because usually there is a completely different way to accomplish a task that you wouldn’t have imagined before.

I’m afraid that something will break and I’ll lose all my data/access to my PC!

Before you dive into any big change, your files should be safely backed up somewhere from which they can easily be restored. I would recommend a USB hard drive (actually, multiple, following the 3-2-1 rule. But that’s for another post). Having a solid backup available will place you in a position of confidence in your endeavor.

This hurdle is compounded by the habit that Windows induces into people being that the solution to any significant breakage is simply to “nuke it from orbit” and reinstall the OS fresh. Breakage on Linux OSes is often settings in a config file that can be reverted. Looking at system logs and pinning down the cause of a breakage is often the path of least resistance to repair a Linux installation. Plus, you pick up useful knowledge along the way. Not so with wiping clean and restarting from a blank slate.

The ultimate cheat code

The importance of having more than one computer available cannot be understated. If you have a spare device that can be designated as your exploratory system, then there’s no need at all to worry about losing your data or your daily driver suddenly becoming inaccessible. Even just having multiple drives that can be selectable boot devices or physically swapped in is preferable to playing around with your production system.

Virtual machines are not the same in this respect, because they fail to put you into contact with firmware and hardware idiosyncracies that different equipment will confront you with. Particularly of the display stack and wireless networking variety, but also with artifacts that peripherals can present.

To this day I still maintain parallel staging environment on which to test configurations and big changes before applying them to my flagship computer. It is also peace of mind to know that even in the worst of scenarios, that you have additional computers waiting in the wings to fail over to. But the biggest benefit this arrangement supplies to beginners is in the ability to learn rapidly.

Rapid iteration learning

Even if one spends hours daily reading the theory of softare and OSes, picking up tips, and memorizing tools and commands, one will get nowhere without actually getting into a system and tinkering. We learn by making mistakes. Setup a computer to be your sandbox, and dive in anticipating that things will probably break. Pick individual components that you want to tame and tackle them individually.

Where something doesn’t make sense, explore help resources in this order:

I had made my biggest strides as a new Linux user while attempting different configurations on a portable spare and trying to recreate the “loadouts” of beginner friendly distros like Mint or Ubuntu using more modular “DIY” distributions. One rabbit hole you can follow is to create a desktop on top of something like openbox and dressing it up with taskbars, file browsers, greeters and so on.

Quick tip: Do not use sudo unless a terminal program specifically requires elevated privileges to run. Some newbies fall into prepending everything with sudo because they’re unsure where it is necessary to do so. Sometimes, trying to run certain programs as standard user will yield “bash: <program_name>: command not found” which is admittedly unhelpful when said program is only executable by root (sudo required). Some programs are nice enough to inform you when permission is denied to normal user accounts:

E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

I shouldn’t have to learn a bunch of esoteric commands to be able to use my PC!

These days, you don’t. But, it would be to your great benefit if you did. Unless you want to be a GUI zombie forever.

Going headless, the boost plate to intermediate and beyond

If you don’t have some server you’re going to SSH into, consider exploring different terminal and ncurses solutions for the things you already use in your desktop session. Imagine that you might need to use your computer without a functioning display server. How would you do so? Some of the most fundamental things to know, in no particular order;

And, ways to do things that you might have thought were only possible with graphical programs:

Some of these may need to first be installed through your package manager. But many, such as top are available pre-installed on pretty much any distribution. There is so much that can be handled through the terminal that, with the exception of visual multimedia, almost any typical task can be done headless. Well, maybe visual multimedia also, depending on how dedicated you are.

And don’t feel silly about recording example commands into a reference file. I still do, and my ffmpeg reference sheet has grown impressive in size. The stuff that you use frequently will become second nature after a while.

I tried installing XYZ program and it broke/doesn’t work!

Use your package manager. Use your package manager. Use your package manager. So many newbies try to continue their Windows habit of going to a vendor’s website, downloading some installer and then attempt to install it. While this is sometimes possible to do, increasingly so with things like snaps and flatpaks, it is really bad hygeine in Linux distros. Get into the habit of only installing software through your package manager.

On many distributions, this takes the form of apt. Although it is certainly possible to use frontends like Synaptic or your desktop environment’s in-house software center. Sticking to software only as packaged for your distribution will keep things much less prone to breakage and make upgrades much simpler. Only after you have gained some proficiency with Linux, should you explore things like adding additional repositories to access more software.

They told me I should install Gentoo!

There is no shame in getting your feet wet with an easy distribution. Linux Mint is an excellent example and is the one that I cut my teeth on when starting out. You can always switch to something more novel later on after accruing some knowledge and familiarity. And still, many even remain on these “beginner” distribtions because everything works to their satisfaction. Isn’t that the end goal? To have a system that you’re satisfied with? There is nothing standing in the way of a knowledgeable user from modifying Linux Mint to suit their own goals.

If you throw yourself straight into the lion’s den from the start, you may find yourself overwhelmed.

Lastly, read the boring stuff

Your choice distribution will likely have a wiki, as well as pages of mailing list threads or a heap of years’ old forum threads. Take some time to parse through these and understand why said distribution has decided on the design and underlying components that it uses, what had been used in the past and why that has changed. Or perhaps this is all just a very polite way of saying RTFM!