Using Apple Mac Keyboard with Ubuntu

You are a Mac user and run Linux machines virtually on your Macbook or your console keyboard is an Apple Mac Keyboard.

Ubuntu Linux sets the keyboard parameters in the file /etc/default/keyboard.

You can set the content manually in /etc/default/keyboard:

XKBMODEL="macintosh"
XKBLAYOUT="ch"
XKBVARIANT="de_mac"
XKBOPTIONS="lv3:alt_switch"

BACKSPACE="guess"

or you can go through the installation process:

Run

sudo apt-get install keyboard-configuration
sudo dpkg-reconfigure keyboard-configuration

Respond with

  • MacIntosh
  • Switzerland
  • Switzerland – German (Switzerland, Macintosh)
  • Both Alt keys
  • No compose key

Logout and log back in. Now you will find your keys in Linux like in the Apple Terminal