← 返回命令列表

Linux command

numlockx 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

numlockx status

Example

numlockx on

Example

numlockx off

Toggle

numlockx toggle

说明

numlockx is a program to control the NumLock key inside X11 session scripts. It's commonly used in login scripts or desktop startup files to ensure Num Lock is in the desired state when a session begins. The command directly manipulates the keyboard LED and state through X11, making it useful for systems where the BIOS Num Lock setting doesn't persist or for users who prefer a specific Num Lock state at login. Without arguments, numlockx turns Num Lock on (equivalent to numlockx on).

参数

on
Turn Num Lock on
off
Turn Num Lock off
toggle
Toggle current Num Lock state
status
Display current Num Lock state

FAQ

What is the numlockx command used for?

numlockx is a program to control the NumLock key inside X11 session scripts. It's commonly used in login scripts or desktop startup files to ensure Num Lock is in the desired state when a session begins. The command directly manipulates the keyboard LED and state through X11, making it useful for systems where the BIOS Num Lock setting doesn't persist or for users who prefer a specific Num Lock state at login. Without arguments, numlockx turns Num Lock on (equivalent to numlockx on).

How do I run a basic numlockx example?

Run `numlockx status` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does on do in numlockx?

Turn Num Lock on