Linux command
beep 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
beep
Example
beep -r [repetitions]
Example
beep -f [frequency] -l [duration]
Example
beep -f [frequency] -l [duration] -n -f [frequency] -l [duration]
Example
beep -f 262 -n -f 294 -n -f 330 -n -f 349 -n -f 392 -n -f 440 -n -f 494 -n -f 523
说明
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.
参数
- -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
FAQ
What is the beep command used for?
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.
How do I run a basic beep example?
Run `beep` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f _frequency_ do in beep?
Frequency in Hertz (default: 440 Hz)