extended_slk_color - Linux


The extended_slk_color command sets the color of the Soft Label Keys (SLKs) of a Linux console. SLKs are the programmable keys usually found at the bottom of the keyboard, labeled F1 through F12.


extended_slk_color [options] <color>


  • -a, –all: Set the color of all SLKs.
  • -b, –background: Set the background color.
  • -f, –foreground: Set the foreground color.
  • -g, –get: Get the current color of the SLKs.
  • -h, –help: Display this help message.
  • -r, –reset: Reset the color of the SLKs to default.
  • -s, –stream: Send the color value to stdin of the running script.


Set the foreground color of all SLKs to red:

extended_slk_color -a -f red

Get the current background color of the SLKs:

extended_slk_color -g -b

Common Issues

  • If the SLKs do not change color, ensure that your terminal emulator supports SLK coloring.
  • Some terminal emulators may not support setting individual colors for each SLK.


The extended_slk_color command can be used with other Linux commands to automate SLK coloring. For example, you can use it with a script to change the SLK colors dynamically based on the current application or task.


while true; do
    color=$(case $(xprop -root WM_CLASS) in
        "*emacs*" ) "green" ;;
        "*terminal*" ) "blue" ;;
        "*firefox*" ) "red" ;;
        * ) "default" ;;
    extended_slk_color -a -f $color
    sleep 1

Related Commands

  • setterm – Set the terminal settings, including SLK color.
  • slkmode – Enable or disable the SLKs.