thorko.deLinux / Unix systems administrator

GitHub Projects

buildserver Build Status Coverage Status

Latest SysadminDB entries


Debian - Downgrade package

Make sure your /etc/apt/sources.list contains different releases

deb unstable main contrib non-free
deb-src unstable main contrib non-free
deb buster main contrib non-free
deb-src buster main contrib non-free

Create a file called /etc/apt/apt.conf.d/80targetrelease

APT::Default-Release "sid";

This is your default release, which apt tries to install the package available on that mirror

If you want to install an old version you have to run

~$ apt-get -t buster install perl-base=5.24.1-7

This installs the perl-base package version 5.24.1-7 if it is available in buster release

Cgroups on Debian

~$ apt-get install cgroup-bin cgroup-tools

Create systemd unit files


# This is a mostly empty service, but allows commands like stop, start, reload
# to propagate to all tinc@ service instances.
Description=Cgroup Rules Engine cgconfig.service
ExecStart=/usr/sbin/cgrulesengd -f $LOG_FILE $LOG
ExecStop=/bin/kill -TERM ${MAINPID}
ExecReload=/bin/kill -12 ${MAINPID}


Description=Cgroup Config Parser
ExecStart=/usr/sbin/cgconfigparser -l $CONFIG_FILE
#ExecStop=/usr/sbin/cgclear -e -l $CONFIG_FILE





Create your config files

The following example will limit your email client thunderbird in cpu and memory


group Email { 
perm {
task {
uid = <your username>;
gid = <your username>;
fperm = 774;
dperm = 775;
admin {
uid = <your username>;
gid = <your username>;
fperm = 774;
dperm = 775;
cpu {
memory {


*:thunderbird cpu,memory /Email

KDE Plasma - Autstart applications

In KDE Plasma you need to place a .desktop file in ~/.config/autostart

The specs for that can be found here


If that doesn't work place a script in ~/.config/plasma-workspace/env and make it executable

GPG cheatsheet

Sign and encrypt file with specific key

gpg -e -r <recipient> -u <id of signing key> --sign -o <output file> <file>
gpg -e -r -u 4A9C0FC09269797E706BB5A6D53E9087CA40E908 --sign -o test.gpg test

Export public key

gpg --armor --output <YOUR-KEY>.asc --export <YOUR-KEY-ID>
gpg --armor --output test.asc --export 4A9C0FC09269797E706BB5A6D53E9087CA40E908

Export secret key

gpg --armor --output <YOUR-SECRET>.asc --export-secret-keys <YOUR-KEY-ID>
gpg --armor --output test-sec.asc --export-secret-keys 4A9C0FC09269797E706BB5A6D53E9087CA40E908

Set special character on keys

First you need to figure out which keycode the key uses when you press it. To do so you start xev and type the key

KeyPress event, serial 40, synthetic NO, window 0x5c00001,
root 0xe7, subw 0x0, time 42471470, (1095,-519), root:(1095,250),
state 0x10, keycode 49 (keysym 0x5e, asciicircum), same_screen YES,
XLookupString gives 1 bytes: (5e) "^"
XmbLookupString gives 1 bytes: (5e) "^"
XFilterEvent returns: False

now create a file calles ~/.Xmodmap

keycode 49 = asciicircum

(c) 2014 by