numlockx (often called xNumLock) is a lightweight utility designed to automatically control the NumLock key status within Linux X11 graphical sessions. It solves the common, frustrating problem of the number pad turning off every time your computer boots to the login screen or desktop environment. Core Commands
You can manually test or execute the main functions in your terminal using these parameters: numlockx on: Turn the number pad on immediately. numlockx off: Turn the number pad off immediately. numlockx toggle: Flip between the on and off states. numlockx status: View whether NumLock is currently active. Step 1: Installing the Package
Before configuring the tool, you must install it using your distribution’s specific package manager: Ubuntu / Debian / Mint: sudo apt install numlockx
Arch Linux / Fedora: sudo pacman -S numlockx or sudo dnf install numlockx Step 2: Automation & Configuration Methods Method A: Global System-Wide Configuration
The most direct way to dictate the global state across all users is to edit the tool’s main package configuration file: Open the file: sudo nano /etc/default/numlockx Locate the setting line: NUMLOCK=auto Change it to: NUMLOCK=on Method B: Activating at the Login Screen (Display Managers)
To type your login password using the number pad right away, you have to attach the command to your specific display manager.
LightDM (Linux Mint, XFCE): Open /etc/lightdm/lightdm.conf and append the following string under the [Seat:*] section: greeter-setup-script=/usr/bin/numlockx on Use code with caution.
GDM (GNOME older environments): Open /etc/X11/gdm/Init/Default and insert /usr/bin/numlockx on toward the bottom of the file.
SDDM / KDE Plasma: You can skip the terminal entirely. Navigate to System Settings > Input & Output > Keyboard and check Turn On under the “NumLock on Plasma Startup” preference block. Method C: Loading Post-Login (Desktop Environments)
If you only need the layout active after logging past the password screen, leverage individual user startup paths: YouTube·Linux Mench Linux Number Lock ON