Install Slackware Linux 12
Wednesday, October 31st, 2007
The Beginning
This tutorial shows how you can set up a Slackware 12 GNU/Linux desktop that is a full-fledged replacement for a Windows desktop, i.e. that has all the software that people need to do the things they do on their Windows desktop.
Unlike some other Linux distributions Slackware users find themselves at the command line quite often. One Slacker who maintains an online Slackware Desktop Enhancement Guide wrote that the “pros and cons of Slackware could be summarized in one word: minimalism.” He went on to discuss the duality of minimalism by noting that although “Minimalism certainly means stability” it also means that Slackware “can be exasperating for some people because the end-user must configure many features with manual editing rather than the more familiar point-and-click.”
You may be asking yourself if Slackware is the right distribution for you. When it comes to Linux you have a huge selection of distributions to choose from. Some like Zenwalk Linux and Vector Linux are based on Slackware but provide a more user friendly point-and-click environment for the new Linux user. Another distro named Ark Linux is designed to be easy to install and learn for users without prior Linux (or computer) experience. There’s also a website that tries to match people with a Linux distribution suitable for them at Linux Distribution Chooser.
To follow this tutorial you should be familiar with navigating the file system with a file manager. And, willing to type commands at the prompt. If you’re not already familiar with using the command line please click here to read an excellent introduction to it.
When installing an Operating System it’s sometimes necessary to know what hardware is installed on the PC. Before beginning this tutorial spend a few minutes and get the name of the hardware installed on your system including the network card, sound card, video card, monitor, and the monitor’s horizontal scan range (HorizSync) and vertical scan range (VertRefresh). If you’re running Windows you may want to audit your systems hardware with Belarc Advisor or the Device Manger. If you’re running Linux you may want to use HardInfo. Please note that I won’t be going through every software installation step by step.
This tutorial comes with no guarantees that it will work for you. These are simply the steps I take to setup Slackware 12 on my desktop computer.
Please backup ALL of your personal data before starting.
Slackware 12 lets you choose between multiple desktop environments (KDE, Xfce, Fluxbox, Blackbox, Window Maker, fvwm2 Fvwm, twm). For this tutorial we will use KDE.
Installing The Base System
Download Slackware 12 and burn it onto a CD-ROM or DVD-ROM.
For this tutorial I downloaded the Slackware 12.0 DVD ISO (everything).
Use the CD-ROM or DVD-ROM you created and boot your computer from it. From here on I will use the term DVD to refer to both the CD-ROM and DVD-ROM.
At the boot prompt press Enter:

If you’re using a US keyboard press Enter. If not type 1 and press Enter:

Select your keyboard map using the UP and DOWN arrow keys.
The OK and Cancel buttons can be selected with the LEFT and RIGHT arrow keys.
Highlight a keyboard map. Select OK and press Enter:

Test your new keyboard layout.
If it works, enter 1 on a line by itself and press Enter:

Welcome to the Slackware Linux installation disk:

During setup root does not have a password. Type root and press Enter:
![]()
Once you login you will be at the Linux command line:
![]()
Before setup begins the hard disk needs to be partitioned. For simplicity’s sake I will create two partitions. One big partition that will be our root partition. The root partition is also known as /. We will also create a 512 megabyte swap partition. Of course, the partitioning scheme is completely up to you - if you like, you can create more than just one big partition. For example, you might want a swap partition, a root partition and a home partition. By partitioning like that you can reinstall the OS without losing your home directory.
Just so you know I’m writing this tutorial on more than one computer so some screenshots may show IDE and others may show SATA. At the moment I am installing on an IBM compatible PC. I have an IDE hard disk and will create a partion on /dev/hda. IDE drives are given names /dev/hda to /dev/hdd. For example, if you have one IDE drive attached to the first IDE controller then it will be named /dev/hda. If you have a second IDE drive on the same drive controller it will be named /dev/hdb. If you have a third drive it will be attached to the second controller and be named /dev/hdc. As you can guess the fourth drive on the second controller is /dev/hdd
After the drive is partitioned it will have a number appended to its name. For example, the second partition on the first drive will be /dev/hda2.
SATA and SCSI drives follow a similar pattern but are represented by sd instead of hd. The second partition of the first SATA drive is named /dev/sda2.
You can partition your disk with either fdisk or cfdisk. For this tutorial I used fdisk.
If you have an IDE drive type
fdisk /dev/hda
and press Enter:
If you have a SATA drive type
fdisk /dev/sda
and press Enter:
Type m to see what commands are available:

To see your current partion table type p
![]()
As you can see there are no partitions on my IDE hard disk:

Warning: IT IS VERY IMPORTANT THAT YOU BACK UP ANY INFORMATION YOU WANT TO SAVE BEFORE DESTROYING THE PARTITION IT LIVES ON.
Create the swap partition. Type n and press Enter:
![]()
Type p to create a primary partition and press Enter:

Type 1 to create partition number 1 on /dev/hda and press Enter:
![]()
The default is fine so press Enter:
![]()
Type +512M and press Enter:
![]()
To make this partion a swap partion type t and press Enter:
![]()
Type L or l (usually case is important in Linux…but not in this case) to see the available codes:
![]()
The code for Linux swap is 82:

Type 82 and press Enter:
![]()
The setup program indicates it’s a swap partion:
![]()
To create the root partition type n and press Enter:
![]()
Type p to create another primary partition:

Type 2 to create partition number two:
![]()
Press Enter to accept the default value for the First cylinder.
Then, press Enter again to accept the Last cylinders default value:

Type p and press Enter to view the newly created partition table. You can see that the swap partition is named /dev/hda1 and the root partition is named /dev/hda2:

Make the root (/dev/hda2) partition bootable by typing a and pressing Enter.
Then type 2 to select the root partition and press Enter:
![]()
To confirm that partion 2 is now bootable type p and press Enter.
The * indicates that /dev/hda2 is a bootable partition:

To save the changes type w and fdisk exits:

At the root prompt type setup and press Enter:
![]()
Select ‘ADDSWAP’ and press Enter:

Options with a [*] are turned on and off with the SPACEBAR.
Press Enter to setup up the swap partition:

Select No to check for bad blocks.

After the swap space has been configured press Enter:

Press Enter to set up the root partition:

Press Enter to do a Quick format:

Press Enter to select ext3:

Press Enter when done:

If you have any FAT or NTFS partitions the setup routine will give you the opportunity to add those partitions to /etc/fstab. You can add them now or later.
If you don’t have any FAT or NTFS partitions you will not see the two screenshots below:


Press Enter to install from your DVD:

Press Enter to scan for your media:

Accept the defaults shown below. If you want to add International language support for KDE use the DOWN arrow key and press the SPACEBAR to select KDEI.
Press Enter:

Accept the default for a full installation and press Enter:

The software installation begins:

Creating a USB boot stick has never worked on my PC. You can try though. I select Skip and then press Enter:

Select a modem and press Enter:

Press Enter to install LILO automatically:

Press Enter unless you need to append extra parameters to the kernel. I’ve never had to add extra parameters:

Press Enter to install LILO to the Master Boot Record.

Select your mouse and press Enter:

Select Yes and press Enter:

You can reconfigure your network at anytime by running the netconfig program at the command line.
The following describes how to set up your computer to use DHCP. You may have a different network configuration. To setup your network now press Enter.

Enter a hostname (it can be anything you want) and press Enter:

Type a domain name and press Enter:

I use a DHCP server and select it and press Enter:

Press Enter or add a DHCP hostname if necessary:

If the settings are correct press Enter:

Press Enter:

I selected No and pressed Enter:

Select the correct setting for your hardware clock and press Enter:

Select your Timezone and press Enter:

For this tutorial we’re using KDE. You can always select a another window manager after the tutorial with the command, xwmconfig.
Select KDE and press Enter.

All new Linux passwords are confirmed by typing them twice.
Press Enter to set a root password:

Press Enter to complete setup:

Using the DOWN arrow select EXIT and press Enter:

Reboot your computer:

After rebooting press Enter at the boot prompt:

At the login prompt type root and press Enter. Then type the password you created for the root account and press Enter:
![]()
Post Installation Configuration
In this section we will create your user account for every day computing. Then we’ll enable basic security, setup audio, create the locate database, start X, and personalize KDE.
adduser:
Generally people don’t run root as their main account. So we’re going to create a new user for everyday use. When you need root access you will be able to use the su command. It’s risky using the root account as your daily account because it’s very easy to run a command and accidentally break your system.
In the terminal we create your new user account by running
adduser
Enter a login name for your new user and press Enter:
![]()
Accept the default for User ID and press Enter:
![]()
Accept the default for Initial group and press Enter:
![]()
Important! Do not accept the default value for Additional groups.
Add the following group names to Additional groups:
cdrom, audio, video, plugdev, scanner
Additional groups will now look like the screenshot below. Press Enter to continue:
![]()
Accept the default Home directory by pressing Enter:
![]()
Accept the default Shell and press Enter:
![]()
Press Enter for Expiry date:
![]()
If all the information below is correct press Enter:

Slackware creates the new account:
![]()
Additional information can be added or press Enter to accept the defaults:

Create a password for your new user. Again, you will need to enter it twice. That completes the Account setup:

To confirm your new account is working correctly logout as root and login with your new username and password. In Slackware 12 notice how the prompt changes from # to $ signifying we’re not logged in as root anymore.

Basic Security Configuration:
Type su at the command line and press Enter:
su
Type the password for root and press Enter:

It is beyond the scope of this tutorial and my knowledge to talk about security in depth. Please refer to other sources for more information such as LinuxSecurity.com, the CERT Coordination Center, and look at nmap since it’s already installed on your system. With that in mind I include the steps below that I take to secure my PC. I use a hardware firewall with NAT and I setup tcpwrappers. I don’t use a software firewall but later you will have the opportunity to install a software firewall named Guarddog. You may be interested in doing a free Internet security checkup at ShieldsUP! after setting up your security.
Change your directory to the /etc directory.
cd /etc
If you haven’t used tab completion before it’s good to know because it speeds up your typing. Hit the Tab key after entering a few letters of a file name or command and tab completion will automatically fill in the rest.
Before working with a configuration file I always create a backup. To create a backup use the copy command named cp.
The three files that we are going to edit are located in /etc. They are hosts.deny, hosts.allow and inetd.conf.
Make a copy of hosts.allow and press Enter.
cp hosts.allow hosts.allow.BAK
Make a copy of hosts.deny and press Enter.
cp hosts.deny hosts.deny.BAK
Make a copy of inetd.conf and press Enter.
cp inetd.conf inetd.conf.BAK
Now that we have backups of those files we’re ready to edit them. I usually use the vi editor and many of the screenshots are taken while using vi. Pico is less esoteric and may be easier for you to use.
The hosts.deny file shown below is how it should look after you edit it. Edit hosts.deny by adding the text ALL : ALL and then save the file and exit.
To use pico to edit the hosts.deny file simply type
pico hosts.deny
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# Version: @(#)/etc/hosts.deny 1.00 05/28/93
#
# Author: Fred
ALL : ALL
# End of hosts.deny.
By adding ALL : ALL you deny access to everyone. We will poke holes in hosts.deny by editing hosts.allow next.
To use pico to edit the hosts.allow file simply type,
pico hosts.allow
The edited hosts.allow is shown below:
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided by
# the '/usr/sbin/tcpd' server.
#
# Version: @(#)/etc/hosts.allow 1.00 05/28/93
#
# Author:
#
#
ALL : 127.0.0.1
ALL : 192.168.1.
# End of hosts.allow.
By adding the line ALL : 127.0.0.1 we are allowing this machine (a.k.a. localhost) access to the services on this machine.
By adding the line ALL : 192.168.1. we allow access from all machines in our LAN.
The dot following 192.168.1. isn’t a typo. It represents the numbers 0-254.
The # is a comment and means to ignore all text that follows on the same line.
Lastly, we will edit inetd.conf and place a # in front of everything except auth:
Type
pico inetd.conf
Place a # in front of time, time and comsat:
![]()
![]()
Leave the Ident service as is. Don’t place a # in front of auth. Save the file and exit:
![]()
Audio Configuration:
alsaconf is a simple shell script which tries to detect the sound cards on your system and then writes a suitable configuration file for ALSA.
Type,
alsaconf
and press Enter:

ALSA searches for your sound cards:

If you’re not sure which card to choose refer back to your hardware notes.
Select your card and press Enter:

Select Yes and press Enter:

Press Enter:

After the sound driver is configured the program exits:

Now use alsamixer to configure the levels.
Type
alsamixer
and press Enter:
![]()
Configure your settings with the LEFT, RIGHT, UP, and DOWN arrow keys. Press the escape key when finished:

To store your settings type
alsactl store
and press Enter:
![]()
Your sound card should now be configured for your system. Your sound card can be reconfigured at any time by rerunning the above commands when when logged in as root.
Create the searchable database of the filesystem:
To search for files you can use the following commands; which, whereis, find, and slocate. Before using slocate for the first time we’ll need to create its database named slocate.db.
Change your current directory to /var/lib/slocate.
cd /var/lib/slocate/
If you type ls you’ll see that there is no slocated.db file.
![]()
We will create the slocate.db file by typing the following command and pressing Enter:
updatedb
This may take several minutes to run. When the update is complete the program exits and you’re returned to the command prompt. If you type ls again you’ll see that slocate.db was created:
![]()
Start X:
Slackware 12 uses the X Window System from X.Org. X provides the graphical user interface for Linux. X can be difficult to configure and troubleshooting X is beyond the scope of this tutorial. If you have a problem starting X please visit http://www.slackware.com/config/x.php for configuration assistance. As long as you have a VESA compatible graphics card then X should start. If you have an ATI or NVIDIA graphics card please see the vendor specific documentation so that you may use their drivers.
Don’t Start X as root. If you’re at the root prompt type exit and press Enter:
![]()
Type startx and press Enter:
![]()
The KDE Personalizer Wizard:
Choose your country and language and click Next:

Click Next:

Set the level of detail and click Next:

Select a theme and click Next:

Click Finish:

Here is your new KDE desktop

Now the base system is ready to be used.