What’s my ubuntu (or debian) version?

I have a  number of machines running various OS releases. Sometimes I need to check what flavor or relase I’m running on the current machine.
While uname -a will show the Linux kernel version, there are a few ways to get more information.
Here are three possibilities:
cat /etc/issue
cat /etc/lsb-release

and my favorite:
lsb_release -a

Here’s some sample output from lsb_release:
$ lsb_release -a
LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid

The “lsb” in these commands refers to the Linux Standard Base.  For more information, see the Linux Foundation .

How to keep apache from autostarting on system boot for Debian or Ubuntu

An easy way to remove apache2 (or another system service) from the start up scripts in Debian or Ubuntu is to use the update-rc.d mechanism.

For instance:

# update-rc.d -f apache2 remove

The “-f” is required if you have existing scripts in /etc/init.d/apache2. If you are planning on manually starting apache, the “-f” is [barring heroic/quixotic effort to create alternatives] a requirement.
Otherwise, in this situation, you will see:

update-rc.d: /etc/init.d/apache2 exists during rc.d purge (use -f to force)

A good write-up is here:
http://www.debuntu.org/how-to-manage-services-with-update-rc.d

crontab editor (alternatives redux)

Well, my Debian server seems to think I should edit crontabs by with pico.   So, the fix (as with Ubuntu) :

update-alternatives --set editor /usr/bin/vim.tiny

Is there a difference between “apt-get purge” vs. “apt-get remove –purge” ?

I was wondering this myself, as the two seemed to do the same thing. Google helpfully turned up a thread from ubuntu-users (Jan. ’09).

This post sums it up well (and accurately, I believe):

>Derek B. writes:
>>Tommy T. wrote:
>>> On Fri, Jan 23 […] Pierre F. wrote:

>>> hi,
>>> Is there any subtle difference between the 2 syntaxes?
>>> (I couldn’t find the answer in any documentation)

>>
>> Don’t they do different things?
>
>No.