How to Stop Ubuntu from Automatically Activating the Num Lock Key

The Number Pad Nuisance

For users with full-sized keyboards, the Num Lock key determines whether the numeric keypad inputs numbers or acts as directional arrows. The desired default state of this key upon booting the computer varies wildly among users. By default, many Linux distributions, including standard Ubuntu desktop, do not automatically activate the Num Lock key during the initial boot sequence or at the GNOME login screen (GDM3). However, if you are using an alternative desktop environment (like KDE Plasma), a specific server configuration, or if you previously installed a utility like `numlockx`, your system may be configured to automatically force the Num Lock key on at startup. If you prefer to use the keypad for navigation, having to manually turn Num Lock off every time you boot is a frustrating repetitive task.

Disabling Startup Num Lock Scripts

To stop Ubuntu from automatically activating the Num Lock key during boot, you need to identify and remove the configuration telling it to do so, which is usually tied to the `numlockx` package or your display manager settings.

First, open your terminal (Ctrl+Alt+T). The most common cause is the `numlockx` utility. Check if it is installed and configured to run by typing sudo nano /etc/default/numlockx. If the file exists and contains the line NUMLOCK=on, change it to NUMLOCK=off. Save (Ctrl+O, Enter) and exit (Ctrl+X).
If you are using the default GNOME Display Manager (GDM3), it usually remembers the Num Lock state of the last session. However, if a script is forcing it, check the startup applications. Open the Startup Applications Preferences GUI tool and look for any entries mentioning “numlock” and uncheck them. Alternatively, if you want to completely remove the ability for the system to force the key via software, you can uninstall the utility entirely by running sudo apt-get remove --purge numlockx. Finally, ensure your system’s motherboard BIOS/UEFI settings do not have a “Boot Up NumLock State” set to “On”, as the hardware setting will override the OS during initial power-on.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.