An Introduction To Slackware Linux
Welcome, Guest.
Do you want Bill Gates' MANDATORY Covid-19 Vaccine? Sign this petition!

Author Topic: An Introduction To Slackware Linux  (Read 3060 times)

Offline Ben

  • Resident WIZARD
  • Contributor
  • *******
  • Posts: 542
An Introduction To Slackware Linux
« on: December 29, 2014, 03:05:42 PM »
An Introduction to (and install guide for) Slackware Linux


I am writing this article partly due to a forum request, and partly because I have wanted to run Slackware again for awhile now. Slackware is one of those distros that gets mentioned a lot, but sadly in the past tense. Well, Slackware was my first distro in the mid-90's and I thought it would be interesting to check in on it. Why have I done that, you ask? Well, because I think that Slackware is a rock solid distro in a time of uncertainty that still has some compelling features even for a newer Linux user. Now, having said that, Slackware was a "beginner friendly" distro in the 90's, that is not quite so true by the modern definition. However, it is not as difficult to learn - or time intensive to use and update - as its' critics would lead you to believe. They key to appreciating Slackware is whether you are willing to invest the time to learn it. If that sounds like the distro for you, read on. So just what is Slackware, where did it come from, and where is it at today?

Slackware is the oldest surviving Linux distribution, originally derived from SLS -  which is arguably the first distro. Slackware was launched in 1993 by Pat Volkerding, originally as a hobbyist distro, but it quickly became commercially sponsored by Walnut Creek CDROM For a time, it was arguably THE Linux distro, used by hobbyists and sysadmins alike and was even the default distro for Emperor Linux. Slackware has had some rough patches, including when Walnut Creek merged with BSDi to create iXSystems and dropped support to focus on FreeBSD. Since then, many have predicted the end of Slackware countless times, yet it forges ahead years later as an independent project (and the years sponsorsed by Walnut Creek are now just a drop in the bucket). Pat Volkerding has remained the Benevolent Dictator For Life steering the ship.  While team members and software have changed, the Slackware philosophy hasn't. In the software world, 21 years is something to hang your hat on.


So, let's get down to business. What is the Slackware philosophy?
Quote
The Slackware Philosophy
Since its first beta release in April of 1993, the Slackware Linux Project has aimed at producing the most "UNIX-like" Linux distribution out there. Slackware complies with the published Linux standards, such as the Linux File System Standard. We have always considered simplicity and stability paramount, and as a result Slackware has become one of the most popular, stable, and friendly distributions available.
To put it simply, Slackware adheres to the UNIX philosophy as much as possible for a Linux distro, and is very BSD-like as a result (it's not a coincidence Walnut Creek sponsored Slackware and FreeBSD). This can be seen in the applications/utilities Slackware sticks with as default, such as the LILO bootloader (because there was never anything wrong with it and it has dead simple config files you can write from scratch in five minutes) and the curses based installer (because it allows Slack to be as modular as possible with lower system requirements and just works). This is also why Slackware relies on text files for configuration and doesn't provide GUI tools. That philosophy is also the reason for lack of dependency handling, but I'll get into this more in a second. To put it simply,
Quote

Slackware is:

 A distribution that can be installed entirely offline with the CD/DVD set.
 A distribution which is released when stable and not according to a fixed schedule. Every release of Slackware Linux is thoroughly tested by the Slackware team and the community. Slackware places high value on stability rather than the “newness” or “freshness” of software.
 A distribution where “simplicity” is preferred over “convenience.” The lack of GUI helpers (common in many other commercial distributions) for system administration tasks is a case in point.
 A distribution where system configuration and administration is done through simple ncurses helper scripts or by directly editing well-commented configuration files through a text editor.
 A distribution that prefers to package “vanilla” software or software that hasn't been modified from upstream development. Little or no patching is done to upstream software and as a result, the software found in Slackware works as closely to what was intended by the original creators as practically possible.
 A distribution that does not add layers of abstraction or complexity on top of existing solutions. For instance, Slackware package management is handled by simple scripts acting on compressed tarball package files (*.tgz, *.txz, *.tbz) and there is no dependency handling for package management.
 A distribution which abides by the common-sense dictum “if it's not broken, don't fix it.”
 A distribution where the major decisions are taken by the BDFL (Benevolent Dictator for Life, the current chief maintainer Patrick Volkerding) and where the development process is more closed than purely community based distributions. As a result, Slackware is highly focused on its core strengths and values and does not cater to every preference of its community or others. For this reason, there is less pressure on the Slackware development team to be popular and cater to the larger mass market.


http://docs.slackware.com/slackware:philosophy

Why no dependency handling?
Quote
This is a huge debate in the Open Source community, bordering on vi vs emacs like flame wars, in reference to package management and dependency handling; but for several reasons, summarized shortly below, Slackware does not prefer “automagic” dependency resolution:

 Automatic dependency handling requires constant manual developer maintenance, and adds potential for dependency hell.
 The official Slackware Linux distribution is anyway meant to act as a cohesive whole. Hence, dependency management is largely moot as installing the entire distribution (the recommended way) takes care of most dependency problems.
 Several popular Open Source applications can be compiled with different dependencies based on compile-time configuration switches. This makes dependency handling harder and more error-prone for binary redistribution of third party software.
 Slackware Linux official distribution does not have the resources or manpower to manage dependency handling for third party software, which is a complex undertaking, requiring a lot of testing and is prone to errors as already noted above.

However, there are still solutions for third-party software automatic dependency handling for those who want it. slapt-get is a package manager that adds dependency handling for third party package sources like LinuxPackages.net and Slacky.eu.
http://docs.slackware.com/slackware:faq

Okay, what is a modern Slackware release like? First off, Slackware does not ship with Pulse Audio, still uses sysvinit as its init system (and will for the forseeable future) and offers the choice of KDE and XFCE as full DEs along with a wide variety of window managers (others can be installed later). Their releases are fully fleshed out, giving you a complete OOTB desktop (aside from the proprietary graphics drivers if you need them, which also can be installed later). Slackware does (contrary to popular misconception) have package management in the form of pkgtools (for installing, removing, etc. additional packages) and slackpkg (for updates and upgrades); it does not have dependency handling. Slackware releases come out when they are ready and new improvements warrant them, but tend to average about 1 to 2 years (sometimes more or less) between them. Slackware supports releases for at least 5 years (often longer) - ftp://ftp.slackware.com/pub/slackware/slackware-12.1/ChangeLog.txt , so you can rest assured that you have a rock solid OS for years to come upon install.

**TIP**  I wanted to clarify a few things at this point in the article, based on feedback I have gotten.  If this doesn't make sense now, come back to it.

1.  All packages are ultimately binaries installed with installpkg (part of Slackware's pkgtools), regardless of whether you get them from slackbuilds.org, Alien BOB, or Slacky.eu.  In some cases you compile (so you know you are getting the source from upstream), in some you don't and rely on a 3rd party binary that is pre-compiled (i.e. Slacky).  With Slackware, you have a tremendous amount of choice (and control) over how, where and if packages are installed.

2.  Part of the reason for no dependency handling is the focus on security and stability; you can rest assured no 3rd party repos or packages are added without your consent this way, the trade off being convenience.  Now, back to the article. :D

Now, let's install Slackware. You have two options, running the stable (fixed) release, or tracking -current. Fixed release isos can be downloaded from any Slackware mirror or bought from the store, while select mirrors provide -current isos. Keep in mind that Slackware64 is a pure 64 bit distro, but you can add multilib support easily by following Alien BOB's guide.  Once you have an iso, booting the CD/USB should prompt us with something like this:
Just hit enter to boot the huge kernel. We now get a prompt to set up our keyboard.

We now log in as root.

*IMPORTANT* If you did not partition the disk ahead of time (this guide assumes you didn't), you will now now need to use cfdisk to do so before proceeding. So, do
Code: [Select]
cfdisk and you should see something like:

We are going to create two partitions in my guide, /boot and /. You can make more for /home, etc. of course, I'm just keeping it simple with the mandatory partitions. Set aside 1000 MB for /boot, and flag it bootable, then give the rest to / (and your other paritions if you use more fleshed out scheme). Again, make sure to set the 1000 MB partition as bootable.

Quit cfdisk. We are now ready to run the installer. *TIP* If you see a screen like this -

It means you skipped this step.

Do:
Code: [Select]
setup to launch our installer. We will see several options in the curses menu; if you use an alternate (non-us) keyboard, set that first with the keymap. We didn't use a swap partition in my guide, but if you do, set that partition next. Okay, now we have to set our target partitions.

First, select your / (root) partition. The installer will ask for a file system type, I just went with EXT4.

Then, choose to add another partition at the prompt, choose that 1st 1000 MB partition, make it ext2 and set it as /boot. This /boot partition is for the LILO bootloader.

If all went well, you should see an fstab like this -

We now proceed to the install step. You should get a prompt like -

Choose your install medium, in my case a CD.

Now choose the package groups and DEs you want (in my case we're going with KDE and just about everything else).

Now let the installer do its thing.


Great, Slackware is installed. Now we have to do some post install configuration. The installer asks if we want to make a USB boot stick (very useful in case we screw up installing LILO). ***PRO TIP*** Make a bootstick if you can spare a usb, these are REALLY handy to have around.

We now install LILO. Just choose simple for now. Install it to the MBR unless you happen to like using floppies in 2014 (I'm sure someone does). Now configure the mouse and whether you want to have it available in the console. Choose to configure the network -
Set a hostname and device name -

Now, configure the network. I use DHCPCD, but if you use a complicated wifi setup you will probably want NetworkManager.

Now we can choose daemons (background processes) to run on start up. The only one I normally add is ntpd, to set my clock with the NTP time server. Choose whether your clock is set to UTC or Local Time (if you use Windows too, it's probably local time) Now choose what DE you want to start when you do
Code: [Select]
startx on the command line. I'm going with KDE. ***TIP*** This is the same as if you did
Code: [Select]
echo exec startkde > .xinitrc and that command can be used to change this later (or you can manually edit your .xintirc). We will now be given a prompt to set our root password.
Now, reboot and log in as root. Congratulations, you are now Slacking.

***A few additional steps.***

We now need to add a user and assign them a home directory. Do:
Code: [Select]
adduser and follow the prompt. The adduser prompt will create our user, assign a home directory and add them to relevant groups. ***TIP*** At the prompt for groups, it offers to let you hit ↑ on the keyboard in order to pre-load recommended groups. Do this, and don't get in a hurry and miss it! If all went well do
Code: [Select]
exit and log back in as our newly created user. Then do:
Code: [Select]
startx to start your DE or window manager of choice (that we set up earlier in the install process).

What if we want to install more packages? Well, we have several options, those being Alien BOB's slackbuilds, slackbuilds.org and Slacky. The first thing to mention is that none of these are officially part of Slackware, but I would trust slackbuilds.org due to their approval process and Alien BOB fully, as Alien BOB is a Slackware team member. I'll get into each of these, how they work, and the pros and cons of using them.

slackbuilds.org - First off, I want to explain why slackbuilds.org is my go to resource for installing additional pacakges. It can be used with sbopkg to give us a simple UI for downloading, installing and updating packages from the slackbuilds.org repository. While it doesn't handle dependencies, it makes installing applications a breeze. To get started, download sbopkg from here - http://sbopkg.googlecode.com/files/sbopkg-0.37.0-noarch-1_cng.tgz, and save in /opt. We then install it by doing (as root or with sudo)
Code: [Select]
installpkg sbopkg-0.37.0-noarch-1_cng.tgz ***TIP*** Rememember the installpkg command, you will be using it a lot. We can now start it from the terminal by doing:
Code: [Select]
sbopkg as root or with sudo. The first step is going to be to sync with the slackbuilds.org repository, this will take a few minutes. Let's take a look at browsing packages. Let's say I search for mplayer. Great, we can search for software using the search option or going through categories, but there is one caveat: Dependencies aren't handled, so it's necessary to view the README (with the option in the sbopkg menu) or to check the project page on slackbuilds.org to find the dependencies and then install them (also via sbopkg of course), working your way up to the top package. For instance, let's look at Qcomicbook: - http://slackbuilds.org/repository/14.1/graphics/qcomicbook/?search=qcomicbook The line "This requires: unrar" tells us that we need to first install unrar for qcomicbook to open archived comics. When I click unrar (or view its README in sbopkg), I see it has no dependencies, so I am then good to go with installing qcomicbook. If we are checking this inside of sbopkg instead (by choosing to view the README), it looks like this - Keep in mind some packages have more dependencies than others. VLC in particular -

One final tip: Some packages have build options that can be set by editing the Slackbuild script (these will normally be listed in the description in the README and on the slackbuilds.org page). Well, we can speed up editing those lines of our slackbuild script within sbopkg. Just choose the "Custom" option, then "Edit Slackbuild" from the menu, and you will be dumped into vim with the slackbuild in question ready to be edited.
Quit vim, and you will find yourself back in sbopkg. It's also worth mentioning that sbopkg has an option in the menu to view (and delete) our installed packages.

Okay, great, we have a lot of packages installed now. But, what about keeping them updated? This is a two step process. First, sync with the slackbuilds.org repository. Then, select updates from the menu. You could altenatively do
Code: [Select]
sbopkg -c Now is a good time to mention that sbopkg can be used on the command line as well as with the curses frontend, the choice is up to you. Anyway, what we just did is fetch potential updates (if any). The GUI handles this for us, but if we used the -c option, it grabs a queuefile (of potential updates). This queuefile can either be loaded manually (from within the sbopkg curses menu) or used to update our files on the command line by doing
Code: [Select]
sbopkg -i ournewlyfetchedque.sqf These are usually kept in /var/lib/sbopkg/queues. It may take a while to get up and running with sbopkg, but it's worth it (especially if you're tracking -current), as it allows for seamless updates and maintanence of our third party packages.

Now, what about installing an application from Alien BOB's slackbuild listings? He actually provides all of the dependencies in a single directory for us. Remember all those VLC dependencies I showed you before? Installing them is as simple as finding the directory of the application you want. Let's say I want Alien BOB's VLC package, I find the directory at - http://www.slackware.com/~alien/slackbuilds/vlc/build/ Example of a build directory: then use lftp to download the entire build sub-directory (containing VLC and its dependencies), by doing:
Code: [Select]
lftp -c "open http://www.slackware.com/~alien/slackbuilds/vlc; mirror build" We then cd into the build directory we just downloaded, and do:
Code: [Select]
chmod +x vlc.SlackBuild then
Code: [Select]
./vlc.SlackBuild This then generates a vlc package in /tmp; I like to move these to /opt, but that's up to you. The package generated in /opt will be something like vlc-2.1.5-x86_64-1_SBo.tgz, so we simply do (in the folder that contains it)
Code: [Select]
installpkg vlc-2.1.5-x86_64-1_SBo.tgz and that is it. The trade off between Alien BOB's slackbuilds and slackbuilds.org is this: Alien BOB will get you up and running much faster, but it's easier to keep track of and update your installed packages with sbopkg. I prefer to use slackbuilds.org, but that's up to you.

Okay, now we're onto the last repository I want to mention, Slacky. Slacky is a European community repository - http://www.slacky.eu/asche/pkgs/index.php?ver=17 - that provides pre-compiled binaries. I don't use them myself, but if you simply have to have a binary they are there. This is the least secure but most convenient way to install a package for Slackware. You can find them by clicking on repository, selecting your arch/release, then choosing a category or searching by name. The site itself is not in English but the package names are, so it's still fairly easy to navigate with any translator like Google Translate.   They are installed by doing (as we just learned for Alien BOB's packages)
Code: [Select]
installpkg ourpackagenamehereSBo.tgz after being downloaded. Again, I recommend keeping these in /opt, but that's up to you. Finally, there is an APT-like package manager (the one used by Debian) called slapt-get that can be used with Slacky.

Now, let's get into keeping our Slackware system up to date. slackpkg is the command line tool we will use for this, but first we have to choose a mirror. To do that, open up /etc/slackpkg/mirrors in a text editor. In my case, I will do
Code: [Select]
vi /etc/slackpkg/mirrors, but you can always just do this with a GUI editor or whatever command line one you prefer. Then uncomment the mirror that looks best for you, I will uncomment ftp://ftp.osuosl.org/.2/slackware/slackware64-current/ ***TIP***If you are running -current, you will see multiple version listings for repos. Make sure to uncomment the one for -current, not the stable release! Anyway, first do:
Code: [Select]
slackpkg update gpg to add the Slackware GPG key. Then do:
Code: [Select]
slackpkg update to fetch the package update list. Then do:
Code: [Select]
slackpkg check-updates to generate a list of our packages to be updated. Next do
Code: [Select]
slackpkg install-new to check for newly introduced dependencies to our packages that will be upgraded. THIS STEP IS REALLY, REALLY IMPORTANT AND SHOULD NOT BE SKIPPED IF YOU ARE TRACKING -CURRENT! Finally, do:
Code: [Select]
slackpkg upgrade-all This will update our entire base system (any of the official Slackware packages we have installed), just not our third party (i.e. slackbuilds packages). That's all there is to keeping our base install up to date. Also, keep in mind this is a first time update guide, you don't have to reconfigure the mirrors and import the GPG key every time (hopefully that is obvious). For more on Slackpkg, see: http://docs.slackware.com/slackware:slackpkg


Where Slackware has improved


There seems to be an impression out there that Slackware is old and set in its ways. Actually, that could't be further from the truth, it has improved rapidly of late. Pat Volkerding is committed to the guiding philosophy of the distro, it's an important distinction. Having said that, one of the criticisms of Slackware over the years was the lack of consistent documentation. Two years ago, the Slackware Documentation Project was started, and today Slackware is on par with most distributions in having well written articles to cover install, upgrades and basic trouble shooting. Also, the addition of Alien BOB (Eric Hameleers) to the team has been a great boon; his slackpkgs with their dependencies contained in a build file have made a quick set up with huge pieces of software (i.e. VLC) easy for new users and he has posted well written guides for most issues (Steam!) that seem to crop up. He also maintains an excellent blog called Alien Pastures that I would recommend any Slackware user to keep up with. Also, I really think the benefit of "The Slackware Philosophy" is more evident now than ever. When you have things like systemd and pulseaudio causing chaos (and creating forks) with distributions like Debian, Slackware just keeps going along with a clear direction set by Pat Volkerding. The future for Slackware looks very bright, even if it is only going to appeal to a certain percentage of desktop Linux users.

Some closing thoughts


I have to say, every time I go back to running Slackware, the consistent quality of the releases amazes me. I have never run into a broken package or had an upgrade from one release to the next break something, nor has -current broken when I've tracked it. There aren't very many software projects that are as good today as they were in 1993. Not only that, Slackware is really unique, in that it is just fun. Look at the random fortune quotes displayed on login (from authors as eclectic as Pete Seeger, Mark Tawin, Woody Allen or Jim Davis and Charles Chulz of Garfield and Peanuts). Then add in the self deprecating humor and outright parodies like Slackware 96 (a parody of Windows 95) the release version jumping from 4 to 7 or the release of version 13.37, and it's hard not to like this distro.


All of that was mentioned before getting into the clever references to BOB and the concept of slacking itself (man, I miss the 90's). Slackware is just utterly unique and oozes personality; I'm pretty sure that if David Lynch used a Linux distro, he'd use Slackware. This isn't a review, because there is no reason to review Slackware. At being what it sets out to be, it achieves it perfectly, you're either on board with the design philosophy or you aren't. Is it right for everyone, or even most desktop Linux users? Probably not. But, if you want a rock solid distro that can be both fixed release and rolling, has a solid base system that gives you applications from upstream without messing them up and that focuses on adhering to the UNIX way, you can't do much better. Few things are as good now as they were 20 years ago, and Slackware is. Now excuse me while I go wheez some juice.

Some random tips:


*When a new release comes out, you can use the sbopkg curses menu to change the repo to the next release (i.e. from 14.0 to 14.1).
*If you are tracking -current, a slackbuilds.org package may occasionally fail, as they are written for the latest stable. If this happens, try using one of Alien BOB's slackpkgs. I've never run into a package I couldn't get on -current if I tried both.
*If you use the proprietary graphics drivers, there is a slackbuild to install the nvidia one at slackbuilds.org Just view the README for instructions. You also need the nouveau-blacklist package, which is part of the distro itself (not 3rd party), it can be fetched easily from a mirror. Then just install it by doing
Code: [Select]
installpkg xf86-video-nouveau-blacklist-noarch-1.txz and rebooting after installing the nvidia driver with the slackbuilds.org slackbuild. **TIP** With nividia, you may need to run the
Code: [Select]
nvidia-xconfig script to get a working xorg.conf after installing the proprietary driver. The Slackware Docs have a good AMD guide. http://docs.slackware.com/howtos:hardware:proprietary_graphics_drivers
*The official support forums are at LinuxQuestions.org http://www.linuxquestions.org/questions/slackware-14/
*There is some pretty nifty stuff in the Slackware Store if you end up using the distro and want to support it. http://store.slackware.com/cgi-bin/store
*Slackware usb boot sticks are also a handy way to boot into other broken distros in a pinch. I like using my old (really small) ones for this.
*ISOs for installing -current can be found at mirrors, like this one - http://taper.alienbase.nl/mirrors/slackware/slackware64-current-iso/
*Here is a good explanation of LILO + UEFI if you need it. https://unix.stackexchange.com/questions/78740/fixing-lilo-with-uefi-system-and-no-optical-drive
*LILO is still a great bootloader, just remember it won't boot into a partition that starts past the 2 TB or so mark of your target hard drive (so don't make / at the back end of a 4 TB drive).

Some of my favorite fortune quotes.

Quote

SAGITTARIUS (Nov 22 - Dec 21)
 You are optimistic and enthusiastic. You have a reckless
 tendency to rely on luck since you lack talent. The majority
 of Sagittarians are drunks or dope fiends or both. People
 laugh at you a great deal.

Try to be the best of whatever you are, even if what you are is no
good.

Eternal nothingness is fine if you happen to be dressed for it.
 -- Woody Allen

If you pick up a starving dog and make him prosperous, he will not bite
you. This is the principal difference between a dog and a man.
 -- Mark Twain

I get up each morning, gather my wits.
Pick up the paper, read the obits.
If I'm not there I know I'm not dead.
So I eat a good breakfast and go back to bed.

Oh, how do I know my youth is all spent?
My get-up-and-go has got-up-and-went.
But in spite of it all, I'm able to grin,
And think of the places my get-up has been.
 -- Pete Seeger

Decisions of the judges will be final unless shouted down by a really
overwhelming majority of the crowd present. Abusive and obscene
language may not be used by contestants when addressing members of the
judging panel, or, conversely, by members of the judging panel when
addressing contestants (unless struck by a boomerang).
 -- Mudgeeraba Creek Emu-Riding and Boomerang-Throwing
 Assoc.

"She said, `I know you ... you cannot sing'. I said, `That's nothing,
you should hear me play piano.'"
 -- Morrisey
« Last Edit: December 31, 2014, 01:59:39 PM by Ben »

Offline JayVii

  • Contributor
  • *******
  • Posts: 1759
    • JayVii's Page
Re: An Introduction To Slackware Linux
« Reply #1 on: December 29, 2014, 11:12:20 PM »
I mentioned it already:
I love your "distribution introductions", ben!

They give me everything i'm looking for, when getting into new distributions. A little history, aims and philosophy and of course the basics of the distribution.
Keep on doing those! Although very long, i enjoy reading them.

I will report back once I actually tried Slackware :)

Offline Ben

  • Resident WIZARD
  • Contributor
  • *******
  • Posts: 542
Re: An Introduction To Slackware Linux
« Reply #2 on: December 31, 2014, 04:34:09 PM »
Thanks for positive feedback, Jay.  Also, I forgot one thing I wanted to mention:  There is no longer a libre version of Slackware (there was, it's discontinued), but there is a repo maintained by the dev of that distro called Slack-n-Free that allows you to convert your Slackware distro over to 100% libre/open source.  Slack-n-Free - it can be used with slapt-get as well, or you can manually download the packages. The homepage with more info - http://connochaetos.org/
« Last Edit: December 31, 2014, 05:04:04 PM by Ben »

Offline niculinux

  • Jr. Member
  • ***
  • Posts: 40
Re: An Introduction To Slackware Linux
« Reply #3 on: January 06, 2015, 04:42:33 PM »
Wow, a super review, thank you very much, Ben!!! <3. Actually, seems to fall in between a review and an how-to, but i wish i have a delorean...:(
"The only thing you need because the triumph of evil is that good men do nothing".

(Edmund Burke)