• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

beep Command Examples in Linux

by admin

beep is a command-line tool in Linux that is used to emit a beep sound from the speaker of a computer. It is typically used as a notification or an alert in shell scripts or other command-line programs.

To use beep, you will need to have the beep package installed on your Linux system. You can install beep using the package manager for your specific distribution of Linux. For example, on an Ubuntu system, you can use the apt command to install beep:

# apt install beep

Once beep is installed, you can use it to emit a beep sound by running the beep command. By default, beep will emit a single beep sound with the default pitch and duration. beep supports a variety of command-line options that allow you to customize the beep sound, such as the pitch, the duration, or the number of times the beep should be repeated. You can use these options to fine-tune the beep sound to suit your needs.

For example, to emit a beep sound with a pitch of 2000 Hz and a duration of 100 milliseconds, you could use the following command:

# beep -f 2000 -l 100

To emit a beep sound that is repeated 3 times, with a pitch of 1000 Hz and a duration of 200 milliseconds, you could use the following command:

# beep -f 1000 -l 200 -r 3

beep Command Examples

1. Play a beep:

# beep

2. Play a beep that repeats:

# beep -r repetitions

3. Play a beep at a specified frequency (Hz) and duration (milliseconds):

# beep -f frequency -l duration

4. Play each new frequency and duration as a distinct beep:

# beep -f frequency -l duration -n -f frequency -l duration

5. 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

Filed Under: Linux

Some more articles you might also be interested in …

  1. sshpass Command: Non-interactive Password Authentication with SSH
  2. How to use ldconfig Command in Linux
  3. How to recreate LVM device files under /dev directory using vgmknodes
  4. RHEL 7 – RHCSA Notes : Create hard and soft links.
  5. mpg123: command not found
  6. dphys-swapfile: command not found
  7. logname Command Examples in Linux
  8. named Command Examples in Linux
  9. csplit: command not found
  10. How To Enforce Password Complexity For All Users, Including “root”, By Using the “passwdqc” PAM Module CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright