Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a desktop running ubuntu 10.04 I want numlock to be turned on initially. What do I have to change to accomplish this?


I checked in my BIOS. It was already set up to have the numlock turned on initially. Yet it isn't being turned on initially. I have a USB keyboard: would that break this functionality? Or, should I ask elsewhere (superuser, perhaps) about how to get that BOIS setting working properly?

share|improve this question
I think it's a BIOS thing, at least that's how I did it on my laptop. – Saifallah Dec 13 '10 at 14:43
Ah, I hadn't thought of that. I'll check that out. – David Oneill Dec 13 '10 at 14:46
up vote 8 down vote accepted

From the man page: "numlockx is a program to control the NumLock key inside X11 session scripts." It's a very simple tool. You invoke it from the commandline or a script

$ numlockx on

will enable numlock and

$ numlockx off

will disable it.

I use it with xfce myself as an autostarted application. Once you have installed the package, go to "Settings->Session and Startup" from the xfce menu. Click on the "Application Autostart" tab, and then on the Add button. Enter whatever you like in the Name and Description boxes and in the Command box, enter "numlockx on" (without the quotes). Click OK and Close, and the next time you login, you'll have your numlock on.

share|improve this answer
That did the trick. Thanks! – David Oneill Dec 13 '10 at 17:09
Thanks so much this was driving me crazy – darryn.ten Jun 20 '12 at 7:01

You will have to try searching in your BIOS, if you do not want to do that then you can try numlockx, it is available in the repositories.

share|improve this answer
What does numlockx do? – David Oneill Dec 13 '10 at 16:00
@David: it allows you to control numlock's status on login screen and upon login. – papukaija Jan 19 '11 at 20:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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