Google Plus

Howto- NumLock on by default in Linux

If you prefer that the NumLock is activated automatically when you turn on your computer, then follow the instructions in this post.

Install the package  numlockx :

- For ubuntu and other debian based

sudo apt-get install numlockx

- Fedora and other rpm based

yum install numlockx

- Now edit  /etc/gdm/Init/Default   and  inert the bellow  code.

sudo vi /etc/gdm/Init/Default

and insert this lines:

if [ -x '/usr/bin/numlockx' ];
 then
 /usr/bin/numlockx on
 fi
 save , exit

Is done.

For questions please refer to our Q/A forum at : http://ask.unixmen.com

  • http://www.facebook.com/papa.rizzo Jay Ro

    Um… this is a BIOS setting. It’s not like Linux turns off NumLock during the boot process.

  • Sergio Chiodi Yamato

     For ubuntu 11.10 and above
    sudo gedit /etc/lightdm/lightdm.conf

    you see this

    [SeatDefaults]
    greeter-session=unity-greeter
    user-session=ubuntu
    greeter-setup-script=/usr/bin/numlockx on (add this line)
    Save and restart.