dumpkeys command in Linux with examples
Last Updated :
23 Sep, 2024
‘dumpkeys’ command in Linux is used for the dump keyboard translation tables. It writes to the standard output and the current contents of the keyboard driver’s translation tables in the format specified by Keymaps.
Here, weâll break down the syntax, options, and practical examples of using the dumpkeys command to make the most of this utility.
Syntax
dumpkeys [Options]
Basic ‘dumpkeys’ Command Example

Common Options for ‘dumpkeys’
Hereâs a breakdown of the most common options you can use with ‘dumpkeys’ to retrieve specific information:
1. -h(- -help):
Displays the list of available options for the dumpkeys command and exits.
2. -i(- -short-info):
Prints out the characteristics of the kernel keyboard driver. Information shown are:
- Keycode Range supported by the kernel: Tells the values that can be used after keycode -keyword in keytable files.
- Number of actions bindable to a key: It tells about how many output a single key can output using different modifier keys.
- Ranges of action codes supported by the kernel: It lists the action values ranging hexadecimal notation, which can be used in the right-hand side of a key definition.
- Number of function keys supported by kernel: It shows the number of action codes that can be used in output strings of characters.

3. -l(- -long-info):
Instructs dumpkeys to print out long information with the list of all action symbols supported by dumpkeys along with symbol’s numeric values. 

3. -n(- -numeric):
By-pass the conversion of action code values to symbolic notation and to print the in hexadecimal format instead. 
4. -f(- -full-table):
Skips all short-hand doubtful output and binds the output in canonical form. 
5. -t(–funcs-only):
Usually dumpkeys prints both the key bindings and the string definitions however, if you specify this option it will print only the function key string definitions.
6. -k(–keys-only):
Usually dumpkeys prints both the key bindings and the string definitions however, if you specify this option then it will print out keys bindings only. 
7. -d(–compose-only):
It prints out only compose key combinations, only if your kernel supports compose key support. 
8. -c(–charset):
It Interprets character action codes to be from the specified character set.
Conclusion
The dumpkeys command is a highly versatile utility for Linux users who need to manage and troubleshoot keyboard layouts. By understanding its options and how to use them effectively, you can take full control over your Linux system’s keyboard configuration.
dumpkeys command in Linux – FAQs
What does the dumpkeys command do in Linux?
The dumpkeys command in Linux is used to dump the current keyboard translation tables. It outputs the key bindings and action codes that define the behavior of your keyboard, including function keys and special characters, based on the active keymap.
How do I install the dumpkeys command in Linux?
The dumpkeys command is typically included by default in most Linux distributions. However, if it is not available, you can install it by installing the kbd package using your distribution’s package manager:
sudo apt-get install kbd # For Ubuntu/Debian-based systems
sudo yum install kbd # For RHEL/CentOS-based systems
How do I display the current key bindings using dumpkeys?
To display the current key bindings (keyboard translation table), use the following command:
dumpkeys [options]
What is the syntax of the dumpkeys command?
The general syntax for the dumpkeys command is:
dumpkeys [options]
Similar Reads
Dirname Command in Linux with Examples
dirname is a command in Linux that is used to remove the trailing forward slashes "/" from the NAME and print the remaining portion. If the argument NAME does not contain the forward slash "/" then it simply prints dot ".". In other words, we can say that the 'dirname' command is a useful tool for e
3 min read
dirs command in Linux with examples
dirs command shell builtin is used to display the list of currently remembered directories. By default, it includes the directory you are currently in. A directory can get into the list via pushd command followed by the dir name and can be removed via popd command. Syntax: dirs [-clpv] [+N] [-N] It
1 min read
enable and disable command in Linux
Enables and disables are the built-in shell commands. enable command is used to start the printers or classes whereas the disable command is used to stop the printers or classes. Syntax For enable Command: enable [-a] [-dnps] [-f filename][name ...] Syntax For disable Command: disable [-c] [-W] [ -r
1 min read
dmesg command in Linux for driver messages
dmesg command also called âdriver messageâ or âdisplay messageâ is used to examine the kernel ring buffer and print the message buffer of the kernel. The output of this command contains the messages produced by the device drivers. Usage of dmesg:When the computer boots up, there are lot of messages(
6 min read
dmidecode command in Linux with Examples
The 'dmidecode' command, short for Desktop Management Interface table decoder, is a powerful utility in Linux that retrieves detailed information about your system's hardware components. This tool reads the DMI table and presents the data in a human-readable format, making it invaluable for system a
4 min read
domainname Command in Linux With Examples
domainname command in Linux is used to return the Network Information System (NIS) domain name of the host. You can use hostname -d command as well to get the host domainname. If the domain name is not set up in your host then the response will be "none". In networking terminology, the domain name i
3 min read
dos2unix and unix2dos commands
Sometimes, you will need to move files between windows and unix systems. Window files use the same format as Dos, where the end of line is signified by two characters, Carriage Return or CR or \r followed by Line Feed or LF or \n. Unix files, on the other hand, use only Line Feed (\n). unix2dos is a
4 min read
dosfsck command in Linux with Examples
dosfsck stands for DOS File System Consistency Check and is part of the dosfstools package in Unix-like operating systems. This command diagnoses and repairs MS-DOS filesystems (FAT12, FAT16, FAT32). Before running dosfsck, it is crucial to unmount the filesystem to avoid data corruption. Syntax:dos
4 min read
dstat Command in Linux With Examples
dstat is a tool that is used to retrieve information or statistics form components of the system such as network connections, IO devices, or CPU, etc. It is generally used by system administrators to retrieve a handful of information about the above-mentioned components of the system. It itself perf
3 min read
du Command in LINUX
The du command in Linux is a powerful utility that allows users to analyze and report on disk usage within directories and files. Whether youâre trying to identify space-hogging directories, manage disk space efficiently, or simply gain insights into storage consumption, the du command provides valu
5 min read