How to Install and Run Slackware 13

A former co-worker once told me “If you want to learn Debian, install Debian. If you want to learn Fedora, install Fedora. If you want to learn Linux, install Slackware.” The philosophy behind Slackware is to keep the system as UNIX-like as possible. There’s not a lot of automatic configuration and you won’t find many bells and whistles, but you’d be hard set to find a more stable and mature distribution. In fact, Slackware is one of the few distros still in existence from Linux’s early days, right along with Debian, SuSE, and Red Hat. Because of this decision to keep things as UNIX-like as possible, Slackware has a reputation for being somewhat difficult to install and confusing to use. While this has been true for a long time, there have been some great improvements in the past few releases, and now seems like a great time to run a guide on this often misunderstood distribution.

Getting Slackware

Torrent downloads for Slackware 13 can be found here. I’ll be using the full DVD ISO for this article as it includes all the packages necessary for a typical install.

Booting the Installer

After burning the ISO to DVD and rebooting, you’ll be taken to the initial boot screen, pick a keymap, and log in.

slackware13-login

Setting up Disks

Chances are, before you can begin the install, you’ll need to set up some partitions. The Slackware Install DVD provides fdisk (purely text-based) and cfdisk (semi-graphical interface) to do the job. In general I’d recommend cfdisk, as I think it’s easier to navigate.

slackware13-cfdisk

If you’re unsure how to set up the partitions, check out A Quick Guide to Linux Partition Schemes.

Once you’re finished with your partitioning, make sure you write the changes to disk and exit the partitioner. You’ll be taken back to the command line, and we can begin the install. Slackware has an installer built into the install DVD, which you can launch by typing

As long as the partitioning has been done correctly, you’ll be taken to the opening screen of the installer.

slackware13-setup

The first thing we’ll do is set the target partition. This will be whichever partition you created in fdisk or cfdisk that you intend to be root (/). In my example screenshots above, it would be /dev/hda1. Next you’ll choose your filesystem. There’s no right or wrong choice here, there are pros and cons to most of the filesystem options. If unsure, ext4 is a good choice.

slackware13-filesystem

Installing the System

When asked to choose the installation source, pick Install from Slackware CD or DVD and let it scan for the drive. You’ll then be taken to the first package installation screen.

slackware13-packages1

If you’re looking to save on space, some of those can be removed without negatively affecting your installation. Deselecting KDE, for example, would greatly reduce disk space needed.

The next step is choosing just how much detail you want to go into when choosing packages. The Full option will install everything, minus the items you deselected in the previous step and is by far the simplest option. Menu and Expert give a good balance between ease and flexibility, allowing you to choose from groups of packages. If you choose one of those options, you’ll be given several screens, one group per screen. Choose this option only if you’re very familiar with what is and isn’t essential your system. We’ll be proceeding using the Full option.

slackware13-packages2

Once you’ve chosen your packages, installation will truly begin. Chances are this will take a while. A long while. A nice feature of the Slackware installer is that it gives descriptions of each package as it installs. You can learn quite a bit by simply watching the packages install and reading what they do.

slackware13-packages3

Installing the Boot Loader

Once the file copy is complete, you’ll be asked if you want to make a USB recovery key. Take your pick from the suggestions provided and you’ll be brought to the boot loader screen. The somewhat odd thing about this is that Slackware uses the lilo boot loader instead of GRUB. According to their website:

Slackware holds to the “tried and true” standard for what gets included inside the distribution. While GRUB works well and includes some features that LILO does not, LILO handles all the essential tasks of a boot loader reliably with a proven track record.

slackware13-lilo

Our example partitions are quite simple so we’ll proceed with the automatic.

Reminder: Installing any boot loader overwrite whatever boot loader may already be in place.

Once you choose the screen resolution for startup and some other minor prompts, you’ll be taken to the screen asking where exactly lilo should be installed. If Slackware is the only operating system on this computer, it should be perfectly ok to install at the default location, the MBR. If you intend to use lilo with other operating systems or without overwriting the MBR, see a more detailed guide such as this.

slackware13-lilo2

After that you choose mouse type (default should be fine) and whether or not to include gpm (recommended).

Network Config

Network configuration in most situations can be left automatic with DHCP. You’d probably know if you needed a special IP or anything. Hostname can be whatever you like, “slackware” is a good standby. When it comes to domain name, unless you have a specific reason, there’s no need to worry about whether or not it’s a “real” domain name, you can put in anything, like mynetwork.rox.

Final Setup

At the Startup Services screen, you can choose… well… startup services. The defaults are all good choices but there are some you may wish to enable or disable, such as CUPS printing or SSH.

slackware13-services

Next up is one of the nice little additions that made Slackware a little more endearing to me, a menu to test and set console fonts. Not much utility but a nice touch.

slackware13-fonts

When you’ve finished picking a font and entering time settings, you’ll get to choose which of the desktop environments you’d like to run.

Once you set a new root password, you’re ready to reboot into your new Slackware system. Don’t forget to create a new user once you’ve rebooted so you won’t be running as root. Your desktop environment can be started from the console with the command

Installing New Software

Even if you installed the full 4GB system, there will eventually be some things you want that Slackware doesn’t have preinstalled. This is where a lot of people give up on Slackware, because unlike most other modern Linux distributions, it has no automated online package manager with dependency resolution and such. That means nothing like apt-get or yum or other such tools by default. This can make package management and upgrades a much more tedious process. There is an alternative, however, to get that functionality. To cover all the bases, here are the three main methods for software installation in Slackware:

Method 1: Slackware Packages
This is how it’s “supposed” to be done. Some software developers make Slackware packages (in .tgz format) available for download, and others can be found on sites such as LinuxPackages.net. Once downloaded, you just open a terminal and enter

Update – MTE readers have suggested SlackBuilds.org and Slacky.eu as better places to find Slackware packages and build scripts.

Method 2: Compile From Source
As with all Linux, you almost always have the option of compiling programs directly from the source code. If you need a refresher on that, check out How to Install Software from a Tarball in Linux.

Method 3: Slapt-get
As the name implies, slapt-get is an apt-like tool for Slackware. It can be used to install, remove, and upgrade packages. The output is nearly identical to apt-get in many places so it should be familiar to most Debian/Ubuntu users.

Unlike apt-get, slapt-get parameters start with double dashes (–). Some common ones include:

  • –update Refresh lists of packages
  • –upgrade Perform system upgrade
  • –install Install a specific package
  • –remove Remove a package
  • –search Find keyword in package lists

That should be enough to get you started. If you run into any trouble, check out the Revised Slackware Book Project. Happy Slacking!

12 comments

  1. You obviously haven’t used Slackware much, or have a very limited need for additional packages. Linuxpackages.net is probably the worst recommendation you could make. It ‘s packages are completely outdated (you’re much luckier finding something for Slackware 9, 10 or 11 than anything more recent), are of varying quality and the site had some dubious practices going on in the past which I don’t want to rehash.
    Anybody thinking of switching would be well advised for the sake of the stability of their machines not to get any packages from there.
    The preferred way is getting the install scripts and source from SlackBuilds.org to compile slack packages that can be uninstalled with pkgtool or gslapt. Slacky.eu also has a huge repository, and with a little edit of the build files, which are also there plus the ready compiled packages, can be changed to compile

    for 64-bit.

    • That’s partly true, it has indeed been several years since I used Slack in much depth. I’ll gladly update the article to include some of the things you mentioned.

  2. Making your own builds via scripts is also the preferred way as opposed to compiling from source, as essentially you are doing just that but into a proper Slackware package that can be tidily removed.

    Also a BIG warning on .tgz packages on the web, most of them are just compressed and are not Slackware packages at all. Did you actually try some of these?

    Based on all this I find this article exceptionally weak. The author does not appear to know much about Slackware but the basics that have been handed down. Even the quote in the beginning I’ve read so many times I can’t even count any more. Linux Professional? Maybe I should switch career.

    • As noted in the previous comment, much of my Slackware experience was a few years ago and at the time I had excellent luck with LinuxPackages. After reading these comments I checked it out more thoroughly and yes it does seem to be quite outdated now.

      This is why it’s a beginner’s guide.

  3. That’s good, thanks. Don’t want possible new converts to get off to a bad start. :)

    I can also recommend Robby Workman’s site at http://rlworkman.net/ for packages, he is heavily involved in SlackBuilds.org and hosts a pre-compiled subset of these on his own site.
    Furthermore http://alien.slackbook.org/dokuwiki/doku.php for help on networking, wifi, and a link to a firewall generator for iptables. There is a lot more documentation there to explore, and helpful links.

  4. I like slackware, but the only “UNIX-like” thing i think is only the BSD style init file structure.

    Slackware was my first real server running distro. now i use debian. (i’m lazy :))

    I learned a lot from slackware, but it was more then 10 years ago since i used it :)

  5. If you’re going to use Slack, you’re probably going to use it to serve other machines at some point. Maybe you want to run Apache. For any server, providing any service, you need to use a fixed IP address (not DHCP) so other machines can find it. DHCP is fine for laptops and for ordinary desktops. But that’s not the usual target for Slackware.

  6. Hi Joshua!

    There is a better way to do Slackware package management. Here’s an article that tells about it:

    http://www.beginlinux.com/desktop_training/168-slackware/1427-slackware-package-management

    I should mention though, that there’s one minor detail that I left out, and didn’t notice until I had already submitted the article. That is place the line. . .

    export ARCH=$(uname -m)

    This way, after either logging out and logging back in, or sourcing the profile file, the Slackbuilds will automatically compile for the correct architecture.

    Ciao,
    Donnie

    • Somehow, my post got somewhat truncated.

      Anyway. . .

      Place the line. . .

      export ARCH=$(uname -m)

      . . .in the /etc/profile file.

  7. You haven’t run across src2pkg, have you? For anything that does ye olde “./configure, make, make install” waltz, and even some things with more exotic build processes, src2pkg makes a binary .tgz (or maybe .txz if they’ve got a new version for 13.0) package out of a source tarball. You can still grab source tarballs for new software, but this way they’re a hell of a lot easier to manage and uninstall. Plus, you only have to build them once each.

  8. #!/bin/sh
    # I made you a script Josh
    # http://www.slackware.com is the first place you should go as a new Slackware user.
    # http://www.slackbuilds.org is the best place to get packages.
    # http://www.slacky.eu is a great resource (I personally don't use it much though)

    # YOU SHOULD REALLY NOT BE ROOT
    adduser joseph
    # log in as this user next time. If you have to be root, use su or sudo

    # If you need to configure X for some reason before switching to the gui…
    xorgsetup

    # I personally enjoy having sound on my box (it makes music entertaining)
    alsaconf

    # sometimes I like to know where things are…
    updatedb
    # then search away
    locate slackware

    # slapt-get? NO! NO! NO!
    # USE SLACKPKG! It actually comes with the distribution.
    # First- edit /etc/slackpkg/mirrors and comment out a single line. (I use vim)
    vim /etc/slackpkg/mirrors
    # Second – update package lists from the interweb
    slackpkg update
    # Third – update your packages
    slackpkg upgrade-all
    # Don't you dare put that in a cron job! Always update manually!

    # Also, if you want something to start up at boot here is a hint…
    ls -al /etc/rc.d/

    #Instead of using startx, one could just switch runlevels
    telinit 4

    #good article but could you please update it for the users' sakes?
    #also, try using xfce instead of ?kde?, you will love it
    #this doesn't mean uninstalling kde, as there are a lot of programs that rely on those packages (too messy for this article)

    echo Cheers!

Comments are closed.

Sponsored Stories