Stefan Durand

My name is Stefan, I'm the admin of LinuxScrew. I am a full-time Linux/Unix sysadmin, a hobby Python programmer, and a part-time blogger. I post useful guides, tips, and tutorials on common Linux and Programming issues. Feel free to reach out in the comment section.

How to Install and Use Netstat on Linux

How to Install and Use Netstat on Linux (CentOS/RHEL, Debian/Ubuntu, OpenSuse & Arch Linux)

This article provides a tutorial on how to install and use Netstat, a command-line network tool, on Linux. Netstat is a command-line utility that can be used to view network connections, routing tables, and a variety of other network-related information on Linux systems. While Netstat… Read More »How to Install and Use Netstat on Linux (CentOS/RHEL, Debian/Ubuntu, OpenSuse & Arch Linux)

disable remap a keyboard key in Linux

FAQ: How to disable/remap a keyboard key in Linux?

Q: How can I disable one or several keys on my laptop keyboard in Linux? When I press the DELETE key, it gets stuck and deletes everything 🙂

A: No problem! You can use the following command to remap or disable any key of your keyboard:

xmodmap -e 'keycode <value>=<action>'

For example, you could run the following command to disable your DELETE key:

xmodmap -e 'keycode 107='

How to get the correct keycode

You can get the keycode that corresponds to a specific keyboard button in one of two ways.

The first method is by using the simple command xev. xev opens a window and then monitors “events” such as keystrokes. It is suitable when you are running a GUI.

xev

The second method, which can be run with only the console, is showkey. This command will monitor for keystrokes for 10 seconds, or until a SIGTERM signal is received.

List of all keycodes

The full list of available keycodes and actions assigned to them on UK keyboard is below…
Read More »FAQ: How to disable/remap a keyboard key in Linux?