The beginner's guide to Slackware Linux

21st Jun 2009 | 10:00

The beginner's guide to Slackware Linux

Get serious with the original Linux distro

Introduction to Slackware

Give a man Ubuntu, and he'll learn Ubuntu. Give a man SUSE, and he'll learn SUSE. But give a man Slackware, and he'll learn Linux. Well, so the old internet maxim goes, but while it's normally used with a touch of humour, there's a great deal of truth in it too.

Slackware is a curious animal, minding its own business while other distros roam the popularity plain and strive for dominance among their peers.

It's not trying to win enormous desktop market share, nor is it loaded with blinking lights, hold-your-hand graphical wizards and package managers that change with every release. Slackware is about as pure a GNU/Linux system as you can get – at least, without all the arduous leg work of Linux From Scratch.

There are many reasons why Slackware has a devoted base of hardcore fans, usually Linux old-timers but occasionally newcomers too. The top four:

  • It's almost entirely developed by one man.
  • The packages are not patched to the hilt.
  • It's comfortable in its own distrosphere.
  • It's very, very, very stable.

Let's look at these in more detail. For most of its history, since the first release in 1993, Slackware has been largely the work of one developer: California-based 42-year-old Patrick Volkerding. Pat had some assistance from other paid developers in the distro's earlier days, but now he's a one-man band – albeit with the help of bug reports and patches from the community – and uses sales of Slackware boxed sets to fund his work on the distro.

An affable chap with a quirky sense of humour, Pat's down-to-earth geekness puts many long-time Linuxers at ease. Got a question? Try Pat. Got a suggestion? Try Pat. Want to file a bug report? Try Pat. Don't worry about mailing lists, project leaders and Bugzilla accounts – Pat's your man. Indeed, he's known as The Man in Slackware circles.

Unbefuddled software

With Pat's central role in Slackware firmly established, we come on to patches. Most distros take the original, upstream source code of a program and weld on patches – one, two, 10, often more – to fit it in with the rest of the software and distro. That's fine for many users, but if you want to be sure you're getting what the developer originally intended, you're better off with Slackware.

Now that's not to say that Pat is a patchophobe – some programs are tweaked in places – but by and large the software is left untouched and you don't feel like you're getting a distorted version of the original.

There's another side of package purity to consider as well. Contrary to what a lot of armchair distro-pundits may have you believe, Slackware does have a package management system. It's just based around very simple tarballs (.tgz files) rather than the dependency tangled, database-backed systems of RPMs and Debs. The upshot of this is that Slackware packages are extremely easy to pop open, fiddle around in and put back together.

Slackware linux install

INSTALL: Slackware's installer isn't graphical, but you can Tab, Space and Enter your way to a working system easily

Slackware's stringent focus on simplicity has led to a few software casualties in its history, most notably Gnome. In 2005, Pat decided that the work of building and integrating the vast mixture of Gnome packages and their dependencies was just too much.

He said: "Please do not incorrectly interpret any of this as a slight against Gnome itself, which (although it does usually need to be fixed and polished beyond the way it ships from upstream more so than, say, KDE or Xfce) is a decent desktop choice."

This kicked other developers into action, with the Dropline Gnome add-on desktop project starting shortly after the announcement. It's a great implementation of Gnome, but the message was clear: if you want your software to be included with Slackware, make sure that it's neatly contained and not a nightmare to build and distribute.

Know your goals

This brings us to our third point: Slackware has steadfastly remained a non-newbie distro. It's not hard to use – far from it – but it doesn't have a graphical installer or step-by-step wizards to automate every aspect of usage and installation. Slackware users are expected to have a fair grounding in the command line and editing configuration files, which returns us to the maxim at the start: if you decide to use Slackware, you aren't shielded from the workings of Linux under the GUI.

You get to learn the underpinnings of Linux, and because the distro doesn't have a huge number of customisations and patches to its software, you don't end up with countless distro-specific config files in guessing-game locations. If you learn the ins and outs of, say, Fedora, you'll be a Fedora guru (which is great). If you learn the workings of Slackware, you'll pick up knowledge that's transferable across many distros.

So Slackware doesn't try to be the best pond for Linux toe-dipping; it strives to be a great all-round distro for those who know exactly what they want and don't want the distro getting in their way. (An example: SUSE's Yast, while undoubtedly a highly powerful tool, can give experienced users a headache by stomping over config file changes.)

Regular reliability

Finally, let's look at Slackware's stability. Without the colossal developer base of Debian, you'd think Slackware would be more prone to problems, but that's not the case. Pat is generally conservative when it comes to integrating new software: the Slackware 12.2 release, for instance, arrived in October 2008 with KDE 3.5, even though KDE 4.1 had been released three months earlier.

Having one man at the helm provides a stability boost too. Multiple teams and developers can lead to a discrepancy between the quality of patches, whereas Pat builds the whole lot before a release and therefore maintains a wide but hands-on view of the distro. Sure, big distros such as Debian need large teams and in that context the approach works well, but for Slackware the 'one man doing it all' approach has done an equally good job.

So there we go. That's Slackware. It's not the newbie's best friend, but it's still a much-loved distro after 15 years and no intermediate-or-above Linux user should go without trying it at least once. Just be aware of one other snippet of wisdom from Slackware circles: "Once you go Slack, you'll never go back."

Installing Slackware 12.2

Your step by step guide to installing Slackware 12.2

Slackware requires at least a 486 CPU and 48MB of RAM, so it's useful for reviving dusty old machines, but if you want to use a modern desktop we recommend a 1GHz CPU and 256MB RAM. You can obtain the distro on CD or DVD from www.slackware.com.

1. Boot Slackware

Slackware linux install 1

Boot your PC from the DVD or first CD-ROM and you'll see an info screen. Read all the text, so you can make informed choices. Type huge.s for an old pre-Pentium Pro machine, or just hit Enter for the default kernel on a more recent box. At the prompt, log in as root.

2. Partition your drivesSlackware linux install 2

Now you'll need to partition your hard drive. Enter cfdisk to bring up the partition manager – the keybindings for options are shown at the bottom. We recommend a minimum 5GB Linux (number 83) partition with a 512MB swap (number 82) partition.

3. Run setup

Slackware linux install 3

Write your partition changes and exit cfdisk. Then enter setup to start the menu-driven installation utility. Choose the ADDSWAP option in the menu to get the process going and begin by selecting the swap partition you created previously.

4. Define the root

Slackware linux install 4

Next, choose the partition you want to use for root. You'll be given a choice of filesystem options – if you've never explored this aspect of Linux before, just stick with ext3. Then the installer will ask you for a media source, so choose CD or DVD.

5. Select software

Slackware linux install 5

You'll then be prompted to select the range of software you want to install. You can go down the list, hitting Space to select or deselect options. Press Enter when you're done.

6. Finishing touches

Slackware linux install 6

The packages will be installed. Now you'll be prompted for a default screen resolution, network settings and root password. Exit the installer and hit Ctrl+Alt+Del to reboot into your installation.

Slackware in graphical mode

Slackware doesn't try to pre-empt you – it doesn't attempt to guess what you want to do and what you're using the installation for. You might be running it as a server or router, in which case the default boot-up mode (to a text login) is perfect. Chances are you'll want to use it in graphical mode, though, so follow these instructions to get it working to your liking.

1. Get graphical

At the login prompt, enter 'root' and then the password you specified during the installation process. To bring up the X server (graphical mode), enter startx and the desktop or window manager you chose during the installation will appear. Note that you're running as root right now, so anything you do could potentially botch your system – as such, it pays to be über-careful!

If you want Slackware to boot into a graphical login screen, edit the /etc/inittab file using the editor of your choice, for example, Nano or Vi. Look for this line:
id:3:initdefault:
This defines the default runlevel that Slackware boots into or, in other words, which background services and daemons are started. Above this line, you'll see a commented list of runlevels and you note that runlevel 4 is used for X11. So change '3' to '4', reboot and you'll get a graphical login screen.

2. Add a new user

Running as root all the time is a bad idea, so the next step is to create a normal, restricted user account for your day-today work. Open up a terminal window and enter adduser. You'll then be prompted for a username, home directory location, default shell, password and other options. You only really need to bother with setting the username and password – adduser will fill out the rest with sane defaults.

3. Manage your packages

Let's explore the package management system in more detail. As mentioned earlier, Slackware's packages are just .tgz tarballs with some meta-information provided via text files inside. You can extract them the usual way (tar xfvz filename) and look around inside to see how they work – they're extracted into the root (/) directory so you'll see files to go in /etc, /usr and so forth.

Slackware linux pkgtool

PKGTOOL: As root, enter pkgtool to bring up a menu-driven interface for adding to and removing from your collection of packages

Also, you'll always find an install directory in the package, which tells Slackware's package tools what to do on installation (doinst.sh) and what the package does (slackdesc). Note that normal Slackware packages don't include dependency information; the distro assumes that you know what the software does and needs beforehand. This may seem annoying initially, but when you've got tired of other distros pulling in a jillion recommended dependencies of dubious value just to install one program, you'll value the complete control you get with Slackware.

If you've got a .tgz package that you want to install, the simplest method is:
installpkg filename.tgz
A more elegant way to go about this is using pkgtool. This brings up a menu-driven interface for viewing the list of installed packages, installing multiple packages from a directory and removing packages. Another system you can use is slapt-get which, as the name suggests, is a Slackware workalike of Debian/Ubuntu's apt-get. This enables you to retrieve packages from various sources on the internet such as the official Slackware archives and www.linuxpackages.net, and includes some basic dependency resolving if you need it.

4. Read more

In the Distros/Slackware section of the DVD you'll find the Slackware Book, slackbook-2.0.pdf. This meaty 284-page guide to the distro covers the topics of installation, configuration and administration in great depth with some excellent Slackware wit and bizarre sci-fi references thrown in; it's the first place you should turn to if you have any problems. Indeed, it's well worth having a thorough read once you've got the distribution installed to explore the system further.

As the guide itself says: "We hope you'll lend it to all of your friends when they come asking about that cool Slackware operating system you're running. While this book may not be an edge-of-your seat novel, we certainly tried to make it as entertaining as possible. With any luck, we'll get a movie deal."

-------------------------------------------------------------------------------------------------------

Liked this? Then check out The pain-free guide to switching Linux distros

Sign up for the free weekly TechRadar newsletter
Get tech news delivered straight to your inbox. Register for the free TechRadar newsletter and stay on top of the week's biggest stories and product releases. Sign up at http://www.techradar.com/register

Follow TechRadar on Twitter

*tutorial Linux
Share this Article
Google+

Most Popular

Edition: UK
TopView classic version