• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

numlockx Command Examples in Linux

by Deepika

numlockx is a Linux utility that provides control over the status of the number lock key in X11 (X Window System) sessions. The number lock key is used to switch between the numeric keypad and the function keys on some keyboards.

In X11 sessions, the number lock key status is not always set to the desired state when the session starts. For example, some keyboard configurations may have the number lock key turned off by default, while others may have it turned on. numlockx provides a way to automatically set the number lock key status to the desired state at the start of an X11 session.

numlockx can be run as a standalone program or included in the X11 startup script. When run, numlockx sets the number lock key status to the specified state, which can be either “on” or “off”. The specified state is applied to all X11 sessions that are started after numlockx is run.

numlockx is useful for users who frequently switch between using the numeric keypad and the function keys, as it provides a way to ensure that the number lock key status is set to the desired state when an X11 session starts. This can help prevent unexpected behavior and increase productivity by eliminating the need to manually set the number lock key status each time an X11 session starts.

numlockx Command Examples

1. Show the current number lock status:

# numlockx status

2. Turn the number lock on:

# numlockx on

3. Turn the number lock off:

# numlockx off

4. Toggle the current state:

# numlockx toggle

Filed Under: Linux

Some more articles you might also be interested in …

  1. filefrag: command not found
  2. pvresize Command Examples in Linux
  3. CentOS / RHEL : How to mount filesystems using UUID
  4. runcon: command not found
  5. conda: Package, dependency and environment management for any programming language
  6. gh issue create: Create GitHub issues on a repository from the command-line
  7. Ubuntu Linux – OpenShot Video Editor
  8. Linux OS service ‘nfs’
  9. “az version” Command Examples (Shows the current version of Azure CLI modules and extensions)
  10. aria2c: Fast download utility (Command Examples)

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright