LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

beep

Produce tones through the PC speaker

TLDR

Play a beep
$ beep
copy
Play a beep that repeats
$ beep -r [repetitions]
copy
Play a beep at a specified frequency and duration
$ beep -f [frequency] -l [duration]
copy
Play multiple distinct beeps
$ beep -f [frequency] -l [duration] -n -f [frequency] -l [duration]
copy
Play the C major scale
$ beep -f 262 -n -f 294 -n -f 330 -n -f 349 -n -f 392 -n -f 440 -n -f 494 -n -f 523
copy

SYNOPSIS

beep [options]

DESCRIPTION

beep uses the PC speaker to produce tones of specified frequency and duration. It can play simple melodies, alert sounds, or serve as an audio notification in scripts.Multiple tones can be sequenced using the -n (new) option to separate distinct beeps. This allows creating simple musical sequences or multi-tone alerts.

PARAMETERS

-f frequency

Frequency in Hertz (default: 440 Hz)
-l duration
Duration in milliseconds (default: 200 ms)
-r count
Number of repetitions
-d delay
Delay between repetitions in milliseconds (default: 100 ms, not applied after the last repetition)
-n, --new
Start a new beep (use for sequences)
-D delay
Delay after every repetition including the last, in milliseconds
-e device, --device=device
Explicitly set the device to use for generating beep tones
-s
Read from stdin and beep after each newline
-c
Read from stdin and beep after each character
-h, --help
Display usage information
-v, -V, --version
Display version information
--verbose, --debug
Enable debug output

INSTALL

sudo apt install beep
copy
sudo dnf install beep
copy
sudo pacman -S beep
copy
sudo apk add beep
copy
nix profile install nixpkgs#beep
copy

CAVEATS

Requires access to the PC speaker device (/dev/input/by-path/platform-pcspkr-event-spkr or similar). May require root privileges or appropriate group membership. Not all systems have a functional PC speaker.

HISTORY

beep was created by Johnathan Nightingale and has been a staple of Linux audio notifications since the early 2000s. It provides a lightweight way to produce sounds without requiring audio subsystems.

SEE ALSO

speaker-test(1), aplay(1), play(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid