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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

numlockx: command not found

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.

If you encounter the below error while running the command numlockx:

numlockx: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install numlockx
Ubuntu apt-get install numlockx
Arch Linux pacman -S numlockx
Kali Linux apt-get install numlockx
Fedora dnf install numlockx
Raspbian apt-get install numlockx

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. btrfs rescue Command Examples in Linux
  2. apt-mark Command Examples in Linux
  3. loadkeys: command not found
  4. ip: command not found
  5. How To Identify User Deleting Files From A Given Directory in Linux
  6. What is the difference between & (ampersand) and && (double ampersand) while executing simultaneous commands on Linux
  7. How to Setup a squid proxy server on CentOS/RHEL 7
  8. xfs_admin: command not found
  9. pngcrush for image optimization
  10. How to add or delete a samba user under Linux

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright