Skip to content

Instantly share code, notes, and snippets.

View KimIV's full-sized avatar

Игорь KimIV

View GitHub Profile
@TheSunCat
TheSunCat / usb-sounds-udev.md
Last active December 7, 2024 16:48
USB Sounds on Linux using udev!

This is an overview of how I configured my system to play a sound when a USB device (such as a flash drive) is plugged in.

Requirements

  • Linux install with udev and systemd.
  • Root access.
  • A utility to play sounds (I used aplay).
  • Sounds to play.

Playing a sound

Using the tool aplay (found in the Arch package alsa-utils), it is easy to play an audio file: aplay insert.wav