Patterson

Photo by Athul Cyriac Ajay on Unsplash

There are two most commonly used ways to check the Slackware version.

The first one is the file /etc/slackware-version that shows the system version.

$ cat /etc/slackware-version 
Slackware 15.0

The second method shows more detailed information about the system in this file /etc/os-release.

$ cat /etc/os-release 
NAME=Slackware
VERSION="15.0"
ID=slackware
VERSION_ID=15.0
PRETTY_NAME="Slackware 15.0 x86_64"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:slackware:slackware_linux:15.0"
HOME_URL="http://slackware.com/"
SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
VERSION_CODENAME=stable

You can easily load the information from this file and use it in your shell script using the command source.

$ source /etc/os-release
$ echo "Distribution: $NAME"
Distribution: Slackware

--

--

Photo by Nhu Nguyen on Unsplash

During the installation of Slackware we are asked to select a keyboard configuration that makes sense to us, however after installing the system and starting the X server (GUI) the default US layout will still be configured.

What we should do to solve this is to copy the configuration file /usr/share/X11/xorg.conf.d/90-keyboard-layout-evdev.conf to /etc/X11/xorg.conf.d/xorg.conf

# cp /usr/share/X11/xorg.conf.d/90-keyboard-layout-evdev.conf /etc/X11/xorg.conf.d/xorg.conf

Then we must edit the xorg.conf file with the text editor of your choice, don’t forget that you need to be the root user. Look for the lines that have Option “XkbLayout” “us” and change it to the acronym of the country you want, as I’m Brazilian, I want to use the Brazilian keyboard pattern so the line would look like this Option “XkbLayout” “br”.

The result should be something like this:

--

--

Patterson

Patterson

Graduated in Computer Science and passionate about programming languages and free software. Here I find a way to share my knowledge while learning even more.