This tutorial shows how to disable your mouse forward/backward buttons in Ubuntu. Though the title said for Ubuntu 24.04, this tutorial should also work in most modern Linux, such as Debian, Fedora, and Arch.
Many mouses today have extra buttons on the side, allowing to navigate forward and back when working with web browsers, file explorers, etc applications.
If you don’t like the side-buttons, like me, then you can disable them in Linux.
Without using third-party apps (e.g., input-remapper), here I’m going to show you how to do the job by creating an udev rule that works in most Linux on both Xorg and Wayland sessions.