• 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 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. How to Enable IPv6 In CentOS / RHEL 5
  2. coredumpctl: command not found
  3. RedHat / CentOS : Managing software RAID with mdadm
  4. groupadd Command Examples in Linux
  5. a2query: command not found
  6. How To Setup mutt in CentOS/RHEL
  7. RHEL 7 – RHCSA Notes – input / output redirection
  8. hashcat Command Examples in Linux
  9. collectd Command Examples
  10. nixos-container : Command Examples in 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