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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to disable auto completion (tab completion) in bash shell

by admin

Disabling auto-complete feature globally for all the users

With bash shell you would usually have the auto completion feature turned on by default. To disable the auto complete feature of the Bash shell for all the users of the system, you can add the following parameter in the file /etc/inputrc:

# vi /etc/inputrc
set disable-completion on

This disable the auto complete feature of bash shell for all the users on the system. After saving the file, users will have to logout and login again for the changes to be reflected.

Disabling auto-complete feature per user only

In case you need to disable auto complete feature for a particular user only, then you will have to copy the /etc/inputrc file to the user’s home directory and add the same parameter.

For example, for the user “john” do the following:

# su - john
# cat /etc/inputrc  > ~/.inputrc
# echo "set disable-completion on" >> ~/.inputrc
# exit

Now you will notice that tab completion is disabled for the “john” user only.

Reverting the changes back

To revert back, just change the parameter to “set disable-completion off” in the file /home/[user]/.inputrc or /etc/inputrc and login again.

Filed Under: Linux

Some more articles you might also be interested in …

  1. age – A simple, modern and secure file encryption tool (Command Examples)
  2. Basic “chmod” Command examples in Linux
  3. dunstify Command Examples in Linux
  4. dvc destroy: Remove all DVC files and directories from a DVC project
  5. How to disable NFS client caching in CentOS/RHEL
  6. konsole Command Examples in Linux
  7. dconf : command not found
  8. lpr: command not found
  9. rpm-ostree Command Examples in Linux
  10. dhcpwn: Test DHCP IP exhaustion attacks and sniff local DHCP traffic

You May Also Like

Primary Sidebar

Recent Posts

  • glab Command Examples
  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright