I have a bug up me arse about most linux tutorials. 90% of linux tutorials are written for one of two reasons:
- As a handy checklist for the person who is writing it. They’re using it instead of a pad of yellow legal paper to keep track of how they set things up. These tutorials tend to have almost no notation about what things actually do, they’re just a running list of commands
- To demonstrate how remarkably clever the person is. These tutorials tend to veer off into lengthly political rants in the middle, all about how infantile and shortsighted the distro developers were when they decided to include XYZ in the canonical sources list, rather than forcing users to follow this 97 step process that is marginally more secure, so long as you don’t accidentally leave off the semicolon at the end of one of the commands.
Where are the tutorials for people like me? I’m not a mouth-breathing moron, just ignorant about linux. I don’t want a running list of things to copy and paste into the command line, I want to understand what I’m doing. And, I want to know when you’re presenting alternatives that are your own personal hobby-horse rather the standard method. Don’t tell me “this is the best way” and then point me in some obscure direction that’s going to cause a dozen headaches later on when I have to alter every other tutorial I try to follow.
On Tutorial to Rule Them
So, I hereby present to you my first tutorial. This tutorial will allow you to rescue all of the other bad tutorials and make them useful again. It only does one thing, and there are only two steps, but they work.
wtf is this?
So, you’re following a tutorial, and it tells you to apt-get a dozen packages, If you’re like me, this makes you very nervous. I want to actually know what these things do before I dump them onto my server. Let’s say one of the packages is “php5-dev”
Enter the following in the command line:
apt-cache show php5-dev
You’ve just told the apt package manager application to get you information about this package. It doesn’t install anything, just tells you what the package does, along with some nifty info about other packages it’s dependent on. In this case, it shows the following:
Maintainer: Debian PHP Maintainers <firstname.lastname@example.org>
Depends: autoconf, automake1.4, libssl-dev, libtool, shtool, php5-common (>= 5.2.0-8+etch1)
… snip …
Description: Files for PHP5 module development
This package provides the files from the PHP5 source needed for compiling additional modules.
PHP5 is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.
Tag: devel::lang:php, role::devel-lib
Sweet! So now I know that it contains the tools to compile additional modules for PHP5. I’m now smarter!
If you are following a lot of tutorials, you’ll end up typing the words “apt-cache show” until you go blind, or develop ganglion cysts on your tendons. Let’s make the automatic computrix machine do it for is. Open your .bash_profile file with your favorite text editor. I like nano:
hit control+v until your cursor reaches the end of the file, then add the following line:
alias c="apt-cache show"
hit control+x, then enter, and you’re out of the text editor. We want to force bash to reload the profile, so type the following:
To see if it worked, type this:
It should bring you back exactly the same info you saw up above. Huzzah!
Now, no matter how shitty the tutorial is that you’re following, you can check out the packages and see what they do before you apt-get install scurvey-dev-core and it translates all of your config files into Cyrillic.