This question already has an answer here:

To be more clear, right now the volume and brightness keys are used and I have to hold 'fn' in order to execute an F1, F2, F3, F4, F5... command. Can I reverse this so it's function key by default and holding 'fn' enables the volume and other special controls?

marked as duplicate by David Foerster, user117103, Eric Carvalho, Zanna, Aaron Sep 28 '16 at 14:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Are you looking for a per-user or system-wide setting? – ændrük Oct 15 '10 at 17:13
  • Could you specify what sort of keyboard this is; a stand-alone Apple USB keyboard, or something built into a laptop? This will help others with the same question find it more easily. – Jeremy Kerr Feb 17 '11 at 3:02
  • pwr.github.io/Solaar this is the solution – user2167582 Nov 2 '16 at 17:17

This is described on the Ubuntu Community Wiki:


You can try:

sudo bash -c "echo 2 > /sys/module/hid_apple/parameters/fnmode"

If it works you can change this permanently (per the linked wiki page):

echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
sudo update-initramfs -u -k all
sudo reboot # optional
  • 6
    That link you posted is quite a lot to read. To help future users get to the permanent solution (that doesn't get undone after each reboot) faster, here's the 3 commands you need to type to make this permanent, per the link you posted above: 1) echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf, 2) sudo update-initramfs -u -k all, 3) (optional) sudo reboot. Done! Works for me on my 2008 white MacBook running Xubuntu 16.04 LTS. – Gabriel Staples Mar 20 '17 at 19:55
  • can confirm that it works on MacBook Air 2015 with 16.04 on it – Egrimo Mar 28 '18 at 6:47
  • 1
    can confirm that it works on MacBook Pro 2015 with 19.04 on it – Kun Ren Apr 20 at 5:16

please try this when editing directly fnmode fails.

echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode


On older Apple laptop hardware, this is accomplished by a configuration setting of PBButtonsd. You would need to add this line to the config file /etc/pbbuttonsd.conf:

KBDMode = fkeysfirst  

PBButtonsd works on iBooks and PowerBooks (PowerPC-based) and MacBooks (Intel-based); the native Ubuntu package seems to have disappeared after Dapper Drake

  • Actually I'm running a Thinkpad T510, I just love these aluminum Apple keyboards. – MetaGuru Oct 17 '10 at 2:36

it may also be worthwhile to check your BIOS options for this feature. On my Dell Inspiron, this can be set through the BIOS. Hopefully it'll work for your hardware too.

Not the answer you're looking for? Browse other questions tagged or ask your own question.