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

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

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/
cp -pi lilo.conf lilo.conf.dist
vi lilo.conf

#timeout = 1200
timeout = 100



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


and eventually remove the user-specific part

source /etc/shrc
#export ENV=/etc/shrc

Either with BASH,

vi /etc/shrc #new file

case "$-" in *i*)
    [[ -z $HOST ]] && HOST=`uname -n`
    (( `id -u` == 0 )) && PS1='$HOST# ' || PS1='$HOST> '

    alias ll='ls -alhF'
    alias l='ls -altrhF'
    #alias cp='cp -i'
    #alias mv='mv -i'
    #alias rm='rm -i'

    alias netstata='netstat -antupe --inet --inet6'
    alias runq='postfix flush'

    alias lynxg='lynx -accept_all_cookies'
    alias lynx='lynx -accept_all_cookies'

    alias push='git nc && git push'
    alias stat='git diff --stat --cached origin/master'

    export TERM=xterm
    #export TERM=linux

    j=$((`grep ^processor /proc/cpuinfo | tail -1 | awk '{print $3}'` + 1))
    export MAKEFLAGS=-j$j
    unset j

Or with KSH,

cat /etc/shells
chsh -s /bin/ksh root
useradd -D -s /bin/ksh

vi shrc #continue

keybd_trap () {
  case ${.sh.edchar} in
    $'\f')    .sh.edchar=$'\e\f';;  # clear-screen (THIS QUESTION)
    $'\e[1~') .sh.edchar=$'\001';;  # Home = beginning-of-line
    $'\e[4~') .sh.edchar=$'\005';;  # End = end-of-line
    $'\e[5~') .sh.edchar=$'\e>';;   # PgUp = history-previous
    $'\e[6~') .sh.edchar=$'\e<';;   # PgDn = history-next
    $'\e[3~') .sh.edchar=$'\004';;  # Delete = delete-char

case "$-" in *i*)
        ( set -o emacs 2>/dev/null ) && set -o emacs
        ( set -o tabcomplete 2>/dev/null ) && set -o tabcomplete
        trap keybd_trap KEYBD


And apply,

. /etc/profile




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

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-9mt.txz

enabling other repositories,

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

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


slackpkg update gpg
slackpkg update
slackpkg install bonnie++ nbench