Command Line Beeping

Hey everyone -

I assume this is probably a pretty easy question to answer, as it is probably just setting a 1 to 0 in some file, but I can't find where.  My command line will let out this annyoing 'BEEP' everytime I do something wrong.  (Like try and continue to scroll after I have reached the bottom of a file in vi, or hitting TAB when there is more than one file to list, etc...)

Anyway, as this is a laptop, it is extremely annoying to have happen when I am somewhere like a restauraunt.  Is there a way to turn this beeping off?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

will there any sound/volume control on your laptop? normal on the side of your laptop try to use the control to turn your laptop sound off or to the lowest.
TopaceAuthor Commented:
no all the sound control is in the os

have a check here but it only for play music on command line, and you need to install software into your OS.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

As I understand this, you want to avoid an audible... This is a "properety" of your shell (the actual ringing of the terminal bell).
Assuming you are using bash, it isn't actually the shell that keep ringing your bell... rather it is the readline library (incorporated for things like eiting command history etc)... Perhaps the following snippet from the bash man-page would help:
       bell-style (audible)
              Controls  what  happens when readline wants to ring
              the terminal bell.  If set to none, readline  never
              rings the bell.  If set to visible, readline uses a
              visible bell if one is available.  If set to  aud­
              ble, readline attempts to ring the terminal's bell.
So add the following (or chage it if already there:-):
set bell-style none
in your $HOME/.inputrc, and those pesky beeps should go away;-).

-- Glenn

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gns, the above will only work if he is in a virtual console. If he is running from a terminal in X he needs to put the line "xset b off" in one of his X startup files such as .xinitrc or .xsession.
Gns, the above will only work if he is in a virtual console. If he is running from a terminal in X he needs to put the line "xset b off" in one of his X startup files such as .xinitrc or .xsession.
No. The xset setting will take precedence under X, but the readline setting will prevent bash (and anything else using readline) from even trying to ring the bell. So one might say its the other way around:-)... "xset b off" will only work for X, while "set bell-style none" will work anywhere:-):-).
Best solution would probably be a combination;).

-- Glenn
I set "bell style none" but couldnt get the bloody thing to stop beeping under X until the "xset b off". Its a mystery :)
Yes... I do believe I've got this working... checking... Oh, I see a possibility... Did you remember to restart the shell (logout/login)? Just checked on a Mdk9.2, and both the .inputrc and xset things work as expected (ie: as I/the docs say:-).

-- Glenn
... and you (for the xset thing... not trying to usurp anything here:-).

-- Glenn
All you need is the escape sequences:

Per-console Beep Configuration

  As of Linux 1.3.43, Martin Mares added configurability to the bell
  sound in console.c. You can change the duration and pitch of the
  console beep on a per-console basis, by writing escape sequences to
  the tty. You can apply your configuration in your own ~/.profile or
  ~/.login, to have a different beep (or no beep) associated to each

  The escape sequences work as follow:

  ·  ESC-[10;xx] chooses the bell frequency in Hertz. The value should
     be in the range 21-32766, otherwise the result is undefined (at
     least up to the 2.0.x version -- I can't foresee the future.  If
     the `xx' argument is missing, the default value (750Hz) will apply,
     as in `ESC-[10].

  ·  ESC-[11;xx] chooses the bell duration, in milli-seconds.  If you
     specify more than 2 seconds, the default applies (125ms). Once
     again, if the `xx' argument is missing (ESC-[11]) the default value
     will be used.

  To print the escape sequences, you can try for example (50Hz, 1s)
  "echo -e "\33[10;50]\33[11;1000]"" with bash (where "-e" means
  `understand escape sequences'. With tcsh "echo
  " 33[10;50] 33[11;1000]" will have the same effect.

  Note that a new `setterm' command might support bell configuration of
  command line, as these control codes are marked as `setterm-commands'.
  However, no `setterm' version I know of supports these codes.

  If you run Linux-1.3.43 or newer, you may be satisfied with the escape
  sequences and avoid reading further. If you run an older kernel (I do
  it myself, on a small 386), or if you want the visual bell, have a
  good reading.
whoops forget that, misunderstood question completely...

-- Glenn
echo 0 >/proc/sys/dev/speaker/beep
Clearly answered (no refund)... Possibly a split.

-- Glenn
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.