i c u, scurvey-dev-core

I have a bug up me arse about most linux tutorials. 90% of linux tutorials are written for one of two reasons:

  1. 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
  2. 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:

Package: php5-dev
Priority: optional
Section: devel
Installed-Size: 2680
Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Architecture: amd64
Source: php5
Version: 5.2.0-8+etch1
Depends: autoconf, automake1.4, libssl-dev, libtool, shtool, php5-common (>= 5.2.0-8+etch1)
Filename: pool/main/p/php5/php5-dev_5.2.0-8+etch1_amd64.deb
Size: 342036
… 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!

bash it

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:
nano ~/.bash_profile
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:
. ~/.bash_profile
To see if it worked, type this:
c php5-dev
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.

3 thoughts on “i c u, scurvey-dev-core

  1. I love aptitude. It’s a handy console GUI (I know, oxymoron) built on top of the apt toolset: http://web.pdx.edu/~hegbloom/Aptitude/UserInterface.html

    I use it all the time. Granted, lots of tricksy little keyboard shortcuts to get used to, but the built-in help always saves me.

    Oh, and something that seems to get lost in the noise, but Ubuntu is fundamentally built on top of Debian. So it’s not really an “either/or” scenario between those two. Ubuntu’s package management (which is 50% of what really defines and differentiates one distro from another anwyay), the apt toolset, is actually Debian.

    What mainly differentiates Ubuntu is their fixed release schedule (every three months or whatever, I don’t recall exactly), which means you can count on package updates (with shiny new features!) on a regular basis. Debian prefers the “we’ll release a new version when it’s damn good and ready” approach, which people like when they want absolute package stability (excepting security updates, of course, which Debian does well and regularly).

    Oh, and speaking of “stability”, it doesn’t mean what most people think it means, which is to say, your server crashing. A functional Ubuntu server is just as “crash-proof” as a functional Debian server. Or at least, on the same order of magnitude, which is in and of itself several of orders better than any NT box you might have lying around.

    The definition of stable they operate under is package stability. Debian folks want to have the server run for years at a time, untouched and uninterrupted except for routinely flawless security patches. By contrast, following the Ubuntu curve means you’ll get new package versions semi-regularly, which might require you to tweak your setup (new configs, new features to disable, what have you) from time to time, along with the rare possibility that you run into package version/dependency conflicts that require some amount of troubleshooting (which, usually, means googling it to find out how the smart people fixed it already). To be honest, I’ve never had that happen, even when running Ubuntu or Debian “unstable”, unless I did it to myself.

    One other big difference is that Ubuntu comes with nice default packages for a fully functional desktop X-window setup. I don’t think Debian has anything comparable at the moment (the packages are there, you just have to hand-pick them), though for server stuff it obviously tends not to matter.

  2. Missing a step.
    all the commands should be proceeded with sudo, and you have to hit ctrl+o before ctrl+x.

    or just ‘sudo aptitude install alias’ and ‘alias c=”apt-cache show”‘
    before the tutorials, but the bashrc makes it permanent

  3. Sudo isn’t needed until you’re actually installing the packages. apt-cache show will work just fine without it. Sudo also isn’t needed to edit the .bash_profile for the current user.

    If you’re using nano to edit your files (as this tutorial suggests), then ctrl+x (Exit) includes WriteOut (ctrl+o) for any file with changes. You don’t need to go through both steps.

Leave a Reply