How to turn off bell sound during TAB completion in linux ?

I. Introduction

Let us have a look at an interesting tip today to turn off/on the bell sound during TAB completion.

We will achieve this by changing inputrc file configuration.

Inputrc file contains configuration of readline library, which provides editing options how the user will enter text from a terminal.

It works by translating keyboard input to specific actions.

Readline is used by most of the linux shells including Bash.

 

II. How to turn off bell sound ?

a. Global System setting: Requires a reboot

[root@nglinux ]# cat /etc/inputrc
# do not bell on tab-completion
#set bell-style none

set meta-flag on
set input-meta on
set convert-meta off
set output-meta on

### Change the bell-style to none.
[root@nglinux ]# cat /etc/inputrc
# do not bell on tab-completion
set bell-style none

### Not restart the system.
[root@nglinux ]# init 6 

 

b. User Specific Setting change
To override the default inputrc options on a per-user basis, we need to create a .inputrc file in the user’s home directory.

# cat ~/.inputrc
set bell-style none

# bind -f ~/.inputrc

Leave a Reply

avatar
  Subscribe  
Notify of