Setting up Slackware Linux

do not forget the Y set


The required steps to proceed with change slightly depending on your scenario:

In the first case, eventually enable ssh root password auth temporarily just to push operator’s public keys there.

Installation (physical host)

Network Setup

check the hostname,


#handled by rc.M
cat /etc/HOSTNAME

static name resolution,

cp -pi /etc/hosts hosts.dist
vi /etc/hosts       localhost
x.x.x.x slack.example.local slack
x.x.x.x gw.example.local    gw
#PUBLICIP   slack


cat /etc/resolv.conf
cat > /etc/resolv.conf <<-EOF
search example.local

ping -W1 -c1

identify your network interfaces as usual with either mii-tool or ethtool, and setup the network,

mv -i /etc/rc.d/rc.inet1 /etc/rc.d/rc.inet1.dist
chmod -x /etc/rc.d/rc.inet1.dist
vi /etc/rc.d/rc.inet1


echo rc.inet1 PATH is $PATH

[[ $1 = stop ]] && exit 0

echo -n lo...
ifconfig lo up && echo done

echo -n eth0...
ifconfig eth0 x.x.x.x/xx up && echo done

echo -n default route...
route add default gw x.x.x.x && echo done

chmod +x /etc/rc.d/rc.inet1

apply and check,

ping -W1 -c1

a cleaner way to shut the NICs down would be,

downall() {
        for netif in `ifconfig | egrep '^[[:alpha:]]+: ' | cut -f1 -d:`; do
                [[ $netif = lo ]] && continue
                ifconfig $netif down
        done; unset netif
        exit 0

[[ $1 = stop ]] && downall

Remote Shell

Upload your SSH keys somehow,

export TERM=xterm
cd ~/
mkdir .ssh/
chmod 700 .ssh/
vi .ssh/authorized_keys
chmod 600 .ssh/authorized_keys

Push your public KEY there and switch back to without-password.

export TERM=xterm
cp -pi /etc/ssh/sshd_config /etc/ssh/sshd_config.dist
vi /etc/ssh/sshd_config

AllowGroups wheel
PermitRootLogin without-password
StrictModes yes
PasswordAuthentication no
X11Forwarding no

diff -u /etc/ssh/sshd_config.dist /etc/ssh/sshd_config
/etc/rc.d/rc.sshd restart

System Tuning

Proceed with some further tweaking,

cat /etc/rc.d/rc.local_shutdown
cat > /etc/rc.d/rc.local_shutdown <<-EOF
#nothing here yet
chmod +x /etc/rc.d/rc.local_shutdown

ln -s rc.d/rc.local /etc/rc.local #already executable
ln -s rc.d/rc.local_shutdown /etc/rc.local_shutdown

cd /etc/rc.d/
ls -alkF
chmod -x rc.bluetooth rc.fuse rc.inetd

Note. keeping rc.udev because without it, I get this error when trying to SSH,

PTY allocation request failed on channel 0

LILO (physical host)

cd /etc/
mv -i lilo.conf lilo.conf.dist
sed -r '/^[[:space:]]*(#|$)/d' lilo.conf.dist > lilo.conf
vi lilo.conf

#timeout = 1200
timeout = 100



#/usr/sbin/slackpkg install db48 nvi
#ln -sf nvi /usr/bin/vi

cd /etc/
cp -pi profile profile.dist
vi profile



and remove the user-specific part.

At the end of /etc/profile, choose either BASH,

source /etc/shrc


export ENV=/etc/shrc




fixing defaults for git,

git config --global core.pager "less -r"
#git config --global --replace-all core.pager more

doing some hardware checking,

grep '^model name' /proc/cpuinfo | uniq
grep ^proc /proc/cpuinfo
free -m
hdparm -Tt /dev/sda | tee -a /var/tmp/hdparm.sda
#hdparm -Tt /dev/xvda | tee -a /var/tmp/hdparm.xvda
#hdparm -Tt /dev/xvda1 | tee -a /var/tmp/hdparm.xvda1

Virtual Terminals (physical host)

this was already done for the slackware/xen guest setup.

I find it convenient to see what happened lately on the console, and if you really want to hide it, just ^L before you ^D.

cd /etc
mv -i inittab inittab.dist
sed 's/agetty 38/agetty --noclear 38/' inittab.dist > inittab
diff -bu inittab.dist inittab


setting up Slackpkg,

cp -pi /etc/slackpkg/mirrors /etc/slackpkg/mirrors.dist
vi /etc/slackpkg/mirrors

(uncomment your favorite mirrors // do not use your own mirror unless daily syncing)

eventually disable dialog,

#cp -pi /etc/slackpkg/slackpkg.conf /etc/slackpkg/slackpkg.conf.dist
#vi /etc/slackpkg/slackpkg.conf


install some packages,

slackpkg install htop #slackware64

System Update

applying latest patches,

slackpkg update
slackpkg upgrade-all
==> (K)eep

locate \.new | grep new$
for f in `locate \.new | grep new$`; do
    diff -bu ${f%\.new} $f
done; unset f

#slackpkg install-new
#slackpkg clean-system


assuming the D set has been installed (and not just the ADD tag)

setting up SlackBuilds e.g. building and installing bonnie++, fetch and install the latest sbopkg package e.g.,

cd /var/tmp/
#git clone
installpkg sbopkg-0.38.1-noarch-1_wsr.tgz 
slackpkg install rsync cyrus-sasl #gpgkeys_curl
sbopkg -r

#slackpkg install patch gcc-g++
slackpkg install guile
sbopkg -i bonnie++

alternative with slackpkg+

fetch the latest slackpkg+ and install it,

installpkg slackpkg+-1.7.0-noarch-10mt.txz

enabling other repositories,

cd /etc/slackpkg/
cp -pi /etc/slackpkg/slackpkgplus.conf /etc/slackpkg/slackpkgplus.conf.dist
vi /etc/slackpkg/slackpkgplus.conf

REPOPLUS=( slackpkgplus slackonly )

#REPOPLUS=( slackpkgplus restricted alienbob slacky )
#REPOPLUS=( slackpkgplus restricted alienbob slacky multilib )

slackpkg update gpg
slackpkg update
slackpkg search bonnie++

Nethence | Doc | Pub | Lab | Pbraun | SNE Russia | xhtml