Debian Ubuntu Mint:

for the deb based distributions

hostnamectrl; # tested on Armbian (Debian for ARM Bullseye)

su - root; # become root
apt update; # always good
apt install console-data

# select a new keymap
# for languages others than English go "other"
dpkg-reconfigure keyboard-configuration

# make changes active
setupcon

now all those special keyboard keys should work like a charm 🙂

# might also be interesting
dpkg-reconfigure console-data

creditz go to: https://benohead.com/blog/2012/04/27/debian-change-the-keyboard-layout-from-the-console/

Fedora RedHat CentOS:

for the rpm distributions

hostnamectrl; # tested on CentOS7

yum install kbd; # is needed

ll /lib/kbd/keymaps/xkb/ | grep de-; # find all available germany keymap layouts

localectl list-keymaps; # alternatively

loadkeys de; # load keyboard layout
localectl set-keymap de; # permanently change keyboard layout
admin