Annoyingly, numlock is not turned on by default in Debian or Fedora. Thankfully, the fix is simple.

Firstly, install the numlockx program. This is a simple command line tool which can turn numlock on or off:
Debian: apt-get install numlockx
Fedora: yum install numlockx

Next, add this to one of the startup scripts. I like to put this at the end of /etc/X11/xinit/xinitrc but there are other places you can put it.

if [ -x /usr/bin/numlockx ];
then
    /usr/bin/numlockx on
fi

And you’re done! Numlock will now be turned on on startup.

  1. Rob says:

    Worked like a charm on my Debian build for Raspberry Pi, Thanks!

  2. Mick Deutsch says:

    Thanks for the info, Tim ..

    I use Fedora and as expected, this worked like a charm and removed a minor annoyance!

    Mine went in .bashrc as I always fire up a terminal on the machine and this makes it portable from installation to installation when I take ~ with me 🙂

    Buy you a beer some time – this and another few snippets made my life that bit easier.

    Mick