Tyler's Site

Abstract

I didn’t feel like writing a post on ZFS this time, so I decided I would try out Slackware. Slackware is the oldest still maintained Linux distro out there, and it is not known for being user friendly, there is a moniker: “if you need to know something about Linux, ask a Slackware user**. While that is funny, I wanted to learn more about it, and try out a distro that might be different and unique compared to most modern distros.

Impressions before installing

I thought it might be a good idea to jot down some thoughts on what I think Slackware will be like before installing the distro; it might be nice compare the perception of the distro to the reality of using it. So, my initial thoughts are:

Potential issues

Things that might be cool

Slackware!

Slackware is the oldest still maintained Linux distribution (since April 1993). The core philosophy of Slackware is to provide the more “Unix-like” Linux distribution available; another pillar of the distribution is simplicity. The distro is also designed to be full featured for both users and developers alike, offering various desktop environments, web tools, editors, and even developer libraries out of the box.

Getting Started

Getting started with Slackware is easy enough, just download the ISO and write it to a flash drive:

# can alternatively use `fetch` command in FreeBSD
wget https://mirrors.slackware.com/slackware/slackware-iso/slackware64-15.0-iso/slackware64-15.0-install-dvd.iso
# be very careful of the disk that you write to, DD will not hesitate to nuke your drives
# let's assume the drive path here is /dev/sdb
dd if=slackware64-15.0-install-dvd.iso of=/dev/sdb bs=4M status=progress

Then restart the computer and boot off of the live media.

Installation

Booting the flash drive and getting a shell in Slackware is easy enough; there is also instructions on what to do after logging in as root on the live media. Partition the disk with your tool of choice. I am going to use cfdisk, but fdisk is also available. Then run setup, once the partitions are made. I partitioned my drive as follows:

Then run setup; I did not read the HELP menu, and did not need to change my keybaord layout, so I immediately started working on formatting filesystems on the partitions. Select the installation source, in my case a USB drive; impressively, there are a lot of package options that can be installed from the live disk:

I thoroughly enjoying the option to install basic and useful applications during the installation process.

The next step it to select a “prompting mode”. I assume that means prompting for the build options for each application; I could try to do something more advanced and fancy, but I am going to go with the “full” prompting mode because I don’t feel like messing with config options that much right now. This prompting mode wastes a bit more space (installer says its about 15G in total), but that is fine for the purposes of me just trying out Slackware. Now, wait for the installation process…

The installer recommends making a bootable USB device to boot into the root filesystem, additionally LILO is not capable of booting UEFI systems, so ELILO is required.

Configure mouse, networking, ConsoleFonts, and some other options. Unfortunately at the end of it, the system was not bootable from just the hard drive for some reason. Not a big deal, I used the install media to boot the OS and was able to get in.

Using Slackware

Now that I am in a real Slackware system, let’s figure out how to connect to the network, install some packages, and create a user. Connecting to a network is fairly straightforward; during the install process, I enabled NetworkManager, which handles networking for me (mostly). I was unable to figure out connecting to WiFi easily, however, I can connect an Ethernet cable and work with that until I can either figure out WiFi, or get a tool that makes it easier. Creating a user can be done the same as any other Linux distro, here is the command I generally use:

useradd -m -s /bin/bash -U -G wheel,video,audio,users ${USERNAME}
passwd ${USERNAME}
# Also have to enable the wheel group for sudo
# I am going to replace this with doas later
visudo

Now I can download, build, and install my suckless applications that I use. Surprisingly, they built without trouble or having to download any other dependencies. With other distros, that is generally a bit more annoying to have to go through, but it just werks™ on Slackware.

Next is package management. This was more complicated than I was initially thinking it would be as Slackware handles packages much differently than other distros that I have used in the past. Slackware doesn’t build and provide much in the way of the repos outside of the base system software. Installing a remote package provided by Slackware can be done with slackpkg (Guide on Linode); alternatively, there is installpkg for installing packages that have already been downloaded to the machine. Finally, there is sbopkg, which functions similar to a traditional repo. After realizing this, I can start getting the rest of my normal utilities installed. Installing the package is as simple as:

# Download sbopkg
wget https://github.com/sbopkg/sbopkg/releases/download/0.38.2/sbopkg-0.38.2-noarch-1_wsr.tgz
# Install
installpkg sbopkg-0.38.2-noarch-1_wsr.tgz
# First sync of repo
sbopkg -r

Now we can use sbopkg to install software like any other distritbuion. An example of installing software with sbopkg might look like:

# searching for package in the repo
sbopkg -s imlib2
# build and install said package
sbopkg -i imlib2

However, do note that it does not seem that you can install multiple packages at a time with sbopkg like you might be able to in Arch or Ubuntu (ext pacman -Sy doas imlib2 lf).

WiFi

I was lazy and connected to wifi via nmcli; there are plenty of guides on doing this as well as the man page.

Upgrading to Slackware current

While using Slackware, specifically when trying to install Spacemacs, I noticed that the packages were a tad outdated. That might not be a horrible problem, but the version of Emacs installed on the system was too old for Spacemacs, so I wanted to upgrade it to the current version; I thought while I was at it, I might as well upgrade everything to current as the kernel is also 5.15 by default, and I was hoping for at least 6.1. The process of upgrading was simple enough by opening up /etc/slackpkg/mirrors in a text editor and un-commenting the repo URL below the section that says “Slackware64-current”. That URL is http://mirrors.slackware.com/slackware/slackware64-current/ for me. Then running slackpkg upgrade-all as root. The process took a while, but once it finally finished I rebooted.

Minor issues

The first reboot after installing Slackware was where I started to get the hint that the distro was a bit more complex that I initially thought. During the slackpkg upgrade-all, many of the system libraries were uninstalled; this would not have been a big deal, however that also broke the networking. After doing another reboot and looking at the available boot options, I realized my error was assuming (like most other distros) the first boot option was the one that I wanted. Reading the boot options more carefully, I booted into the 6.10.5-generic boot option, in which networking was working on. X was still broken, but reinstalling the library that the error message was complaining about fixed that issue.

After researching this a bit, I found this page explaining the recommended update/upgrade procedure. Here is the cliff notes for this, though I recommend reading the actual page if you are an aspiring Slackware user (or also asking in IRC might be good too).

# Update repo
slackpkg update
# Upgrade slackpkg
slackpkg upgrade slackpkg

# Upgrade packages marked in ChangeLog.txt, will not install packages that are currently not on the system
slackpkg install-new
# Compare Slackware packages with currently installed packages and install the ones that are out of date
slackpkg upgrade-all
# Show a list of removed packages
slackpkg clean-system

Closing thoughts

Slackware is an interesting distro that I think I am going to keep around for a bit. I am not sure that I will become a long time Slackware user, but it does seem like an interesting system that I still have a lot to learn about. It can definitely teach new users how Linux works, and challenge Linux users that have not used it before.